Пример #1
0
 public Task <List <YouTubeChannelPreviewDto> > Handle(GetYouTubeChannelPreviewQuery request, CancellationToken cancellationToken)
 {
     return(_context.YouTubeChannels
            .Select(YouTubeChannelPreviewDto.Projection)
            .ToListAsync(cancellationToken));
 }
Пример #2
0
 public async Task <IActionResult> GetYouTubeChannelPreview([FromQuery] GetYouTubeChannelPreviewQuery query)
 {
     return(Ok(await Mediator.Send(query)));
 }