Exemplo n.º 1
0
        public PartialViewResult ListaPartnerow()
        {
            PartnerListViewModel model = new PartnerListViewModel
            {
                Partners = repository5.Partners
            };


            return(PartialView("ListaPartnerow", model));
        }
Exemplo n.º 2
0
        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));
        }