public ActionResult ProfilesForUser(string userID) { if (String.IsNullOrWhiteSpace(userID)) { return(new HttpNotFoundResult()); } using (var uow = ObjectFactory.GetInstance <IUnitOfWork>()) { var userDO = uow.UserRepository.GetByKey(userID); var profiles = uow.ProfileRepository.GetQuery().Where(pn => pn.DockyardAccountID == userID); var vm = new UserProfilesVM { UserName = userDO.UserName, UserProfiles = profiles.Select(p => new UserProfileVM { Id = p.Id, ProfileName = p.Name }).ToList() }; return(View(vm)); } }
public async Task <BaseResponse> UserProfile(UserProfilesVM model) { return(constructResponse(_businessWrapper.UserBL.UpdateProfile(model))); }