public async Task <ActionResult <List <LanguageLookupModel> > > GetAll([FromQuery] GetLanguagesListQuery query) { return(Ok(await Mediator.Send(query))); }
public async Task <List <LanguageLookupModel> > Handle(GetLanguagesListQuery request, CancellationToken cancellationToken) { return(await _context.Languages.ProjectTo <LanguageLookupModel>(_mapper.ConfigurationProvider).ToListAsync(cancellationToken)); }