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

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