public ActionResult ListOfDCs() { AutoMapper.Mapper.CreateMap <DistributionCenter, DistributionCenterViewModel>(); var dcs = Mapper.Map <IEnumerable <DistributionCenterViewModel> >(dcContracts.GetAll()); return(View(dcs)); }
public ActionResult Create() { var dcContracts = new DistributionCentersContracts(); ViewBag.DistributionCenterId = new SelectList(dcContracts.GetAll(), "DistributionCenterId", "Name"); ViewBag.RoleId = new SelectList(userContracts.GetAllRoles(), "RoleId", "RoleName"); return(View()); }