public static YouTubeVideoCollectionDto ToDto(this YouTubeVideoCollection youTubeVideoCollection) { return(new () { YouTubeVideoCollectionId = youTubeVideoCollection.YouTubeVideoCollectionId }); }
public async Task <Response> Handle(Request request, CancellationToken cancellationToken) { var youTubeVideoCollection = new YouTubeVideoCollection(); _context.YouTubeVideoCollections.Add(youTubeVideoCollection); await _context.SaveChangesAsync(cancellationToken); return(new Response() { YouTubeVideoCollection = youTubeVideoCollection.ToDto() }); }