Sunil Sudhansu

Sunil Sudhansu

  • 1.4k
  • 307
  • 32.8k

How to add value in model from repoasitory model

Feb 9 2019 3:19 AM
public class EmployeeMasterListViewModel
{
public List<EmployementDetailViewModel> EmployementDetail { get; set; }
 
}
 
 
EmployeeMasterListViewModel EMPLIST = new EmployeeMasterListViewModel();
var employeedetail = _DbContext.Proc_GetAllEmployeeMasterList(EmployeeID).ToList();
foreach (var item in employeedetail)
{
EmployementDetailViewModel obj = new EmployementDetailViewModel();
obj.EmployeeID = item.EmployeeID;
obj.EmployeeCode = item.EmployeeCode;
EMPLIST.EmployementDetail.Add(obj); 
 
How to add value in model from repoasitory model 
 
 

Answers (1)