public PartialViewResult ListaPartnerow() { PartnerListViewModel model = new PartnerListViewModel { Partners = repository5.Partners }; return(PartialView("ListaPartnerow", model)); }
public IHttpActionResult Get() { PartnerListViewModel viewmodel = new PartnerListViewModel(); PartnerDataController dataCtrl = new PartnerDataController(); foreach (var model in dataCtrl.GetItems().Where(x => x.IsActive).OrderBy(x => x.PartnerPackID).ThenBy(x => x.Position)) { PartnerViewModelItem item = new PartnerViewModelItem(); item.FromModel(model); viewmodel.Data.Add(item); } return(Ok(viewmodel)); }