public async Task <IActionResult> AddUser([FromForm] ViewModels.ProjectManageUsersViewModel viewModel) { if (string.IsNullOrEmpty(viewModel.ProjectId)) { return(NotFound()); } if (string.IsNullOrEmpty(viewModel.UserId)) { return(NotFound()); } await _repo.AddUserAsync(new ProjectUser { ProjectId = viewModel.ProjectId, UserId = viewModel.UserId }); return(RedirectToAction(nameof(ManageUsers), new { id = viewModel.ProjectId })); }