public async Task <IActionResult> GetAll() { var request = new GetAllAssociationRequest(); var result = await _mediatorService.Send(request); return(Ok(result)); }
public async Task <List <GetAssociationDto> > Handle(GetAllAssociationRequest request, CancellationToken cancellationToken) { return(await _context.Set <Association>() .ProjectTo <GetAssociationDto>(_mapper.ConfigurationProvider) .ToListAsync(cancellationToken)); }