public ActionResult GetCompanies() { var company = _company.GetCompanies(); var companyModel = company.Select(x => new companyViewModel { Id = x.Id, Code = x.Code, Name = x.Name, Address = x.Address, Phone = x.Phone, Email = x.Email, IsDelete = x.IsDelete, CreatedBy = x.CreatedBy, CreatedDate = x.CreatedDate, UpdatedBy = x.UpdatedBy, UpdatedDate = x.UpdatedDate }).ToList(); var companies = new companyIndex { CompanyModel = companyModel }; return(View(companies)); }
public ActionResult Create() { ViewBag.CompanyList = new SelectList(_company.GetCompanies(), "Id", "Name"); return(PartialView()); }