public async Task <IEnumerable <TaskDetailDto> > HandleAsync(FindTaskDetailByAssinee query)
        {
            var tasks = await _taskRepository.FindByAssigneeAsync(query.AssigneeId);

            // Good place to make a linq projection provided by automapper
            return(tasks.Select(x => new TaskDetailDto(x.Title)).ToList());
        }
コード例 #2
0
 public async Task <ActionResult <IEnumerable <TaskDetailDto> > > Get([FromQuery] FindTaskDetailByAssinee query)
 {
     return(Ok(await _dispatcher.QueryAsync(query)));
 }