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