public async Task <IActionResult> GetAllGenres([FromQuery] GetGenreListQuery query) { return(Ok(await Mediator.Send(query))); }
public async Task <IEnumerable <KeyValuePairResource> > Handle(GetGenreListQuery request, CancellationToken cancellationToken) { var genres = await this.genreRepository.FindAllAsync(); return(mapper.Map <IEnumerable <KeyValuePairResource> >(genres)); }