public ActionResult Index() { IEnumerable <VUserProfileTransferModel> vUserProfileDtos = _vUserProfileService.GetVUserProfiles(); List <UserProfileGridViewModel> userProfiles = Mapper.Map <IEnumerable <VUserProfileTransferModel>, List <UserProfileGridViewModel> >(vUserProfileDtos); return(View(userProfiles)); }
private List <SelectListItem> GetUsers() { var users = Mapper.Map <IEnumerable <VUserProfileTransferModel>, List <UserProfileGridViewModel> >(_vUserProfileService.GetVUserProfiles()); List <SelectListItem> selectItems = new List <SelectListItem>(); foreach (var item in users) { selectItems.Add(new SelectListItem { Text = item.FullName, Value = item.UserId.ToString() }); } return(selectItems); }