private void FillEditProfileModel(EditProfileModel model) { var userProfile = Execute(() => _accountService.GetUserProfile(model.UserId)); model.CopyFrom(userProfile); }
public ActionResult EditProfile(int userId) { var model = new EditProfileModel { UserId = userId }; FillEditProfileModel(model); if (ModelIsValid) return View(model); return RedirectToAction<AccountProfileController>(o => o.ProfileInfo(CurrentUser.Id)); }