public async Task <IActionResult> Index() { var readProjectsRequest = new ReadProjectsRequest(); var response = await _projectApplicationService.Handle(readProjectsRequest); return(View(response)); }
public async Task <IEnumerable <ProjectResponse> > Handle(ReadProjectsRequest request) { var projects = await _projectRepository.ReadAll(); var response = projects.Select(project => project.Adapt <ProjectResponse>()); return(response); }