public ActionResult Index(UserProfileSettingsViewModel settings) { if (this.ModelState.IsValid) { var userId = this.User.Identity.GetUserId(); var user = this.profiles .GetProfileById(userId) .FirstOrDefault(); this.profiles.Edit(user, settings); this.TempData["Message"] = string.Format(GlobalConstants.SuccessMessage, " Save."); return(this.RedirectToAction("Index", new { controller = "Profile", area = "Users" })); } this.TempData["Message"] = string.Format(GlobalConstants.FailMessage, " Save."); return(this.View(settings)); }
public void Edit(User model, UserProfileSettingsViewModel viewModel) { base.Edit(model, viewModel); }