public Task <List <YouTubeChannelPreviewDto> > Handle(GetYouTubeChannelPreviewQuery request, CancellationToken cancellationToken) { return(_context.YouTubeChannels .Select(YouTubeChannelPreviewDto.Projection) .ToListAsync(cancellationToken)); }
public async Task <IActionResult> GetYouTubeChannelPreview([FromQuery] GetYouTubeChannelPreviewQuery query) { return(Ok(await Mediator.Send(query))); }