public async Task <IActionResult> Index() { AdminUserIndexViewModel viewModel = new AdminUserIndexViewModel { Users = await userService.GetAllAsync(), UserRoles = await userRoleService.GetAllAsync(), UserStatuses = await userStatusService.GetAllAsync() }; return(View(viewModel)); }
public async Task <ApiResponse> GetAll() { IEnumerable <UserStatus> result = await userStatusService.GetAllAsync(); if (result != null) { return(new ApiResponse(result, ResponseStatusCode.Success, "Successfully returned UserStatus list.")); } return(new ApiResponse(result, ResponseStatusCode.Error, "Could not return UserStatus list.")); }