Example #1
0
 public async Task <List <JogoDto> > Handle(GetJogosQuery request, CancellationToken cancellationToken)
 {
     return(await _context.Jogos
            .OrderBy(x => x.Nome)
            .ProjectTo <JogoDto>(_mapper.ConfigurationProvider)
            .ToListAsync(cancellationToken));
 }
Example #2
0
 public async Task <ActionResult <List <JogoDto> > > GetAmigos([FromQuery] GetJogosQuery query)
 {
     return(await Mediator.Send(query));
 }