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