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

            return(mapper.Map <IEnumerable <KeyValuePairResource> >(genres));
        }