public async Task <IActionResult> UsersManagement(UsersManagementModel model) { model.Users = await _moneyUserManager.GetUsersAsync(); model.Roles = await _moneyRoleManager.GetRolesAsync(); return(View(model)); }
public async Task <IActionResult> UsersManagementFormAction(UsersManagementModel model) { string message = await _moneyRoleManager.ChangeUserRole(model.SelectedUser, model.NewRole); ViewData["UsersManagementMessage"] = message; await _logManager.WriteAsync(User.Identity.Name, message); model.Users = await _moneyUserManager.GetUsersAsync(); model.Roles = await _moneyRoleManager.GetRolesAsync(); return(View(nameof(MainController.UsersManagement), model)); }