public async Task <IActionResult> GetFairs([FromQuery] GetFairsQuery query) { return(Ok(await Mediator.Send(query))); }
public Task <List <FairsPreviewDto> > Handle(GetFairsQuery request, CancellationToken cancellationToken) { return(_context.Fairs .Select(FairsPreviewDto.Projection) .ToListAsync(cancellationToken)); }