よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public async Task <IEnumerable <TaskDetailsDto> > Handle(GetAllTasksForTeamQuery request, CancellationToken cancellationToken) { if (!_authService.UserRoleAdminOrTeamIdMatches(request.TeamId)) { throw new AuthenticationException("Access denied"); } var tasksFromDb = await _taskService.GetAllTasksForATeamAsync(request.TeamId); var tasksToReturn = tasksFromDb.Select(t => _mapper.Map <TaskDetailsDto>(t)); return(tasksToReturn); }