public async Task <IActionResult> Index(string username) { var view = await this.userService.GetUserByUsernameAsync <ProfileViewModel>(username); var model = new DbDetailUserComplexModel() { ViewModel = view }; return(this.View(model)); }
public async Task <IActionResult> Edit(DbDetailUserComplexModel model, string userId, string returnUrl) { var result = await this.adminUserService.DbUpdateAsync(model.InputModel, userId); if (result) { return(this.Redirect(returnUrl)); } this.ModelState.AddModelError("Error", "Problem happen proceeding your request!"); return(this.Redirect(returnUrl)); }