public async Task <ProjectInvitesModel> Handle(ProjectInvitesRequest request, CancellationToken cancellationToken) { var filter = fMapper.Map <ProjectInviteFilterModel, ProjectInviteFilterDto>(request.Model); var entries = await fProjectInviteRepository.GetAsync(filter, cancellationToken); return(new ProjectInvitesModel { Entries = fMapper.Map <ICollection <ProjectInviteDto>, ProjectInviteModel[]>(entries) }); }
public async Task <ProjectInviteModel> Handle(ProjectInviteRequest request, CancellationToken cancellationToken) { var dto = await fProjectInviteRepository.GetAsync(request.Id, cancellationToken); if (dto is null) { throw new NotFoundCodeException(request.Id, "Project Invite"); } return(fMapper.Map <ProjectInviteDto, ProjectInviteModel>(dto)); }