예제 #1
0
 public static YouTubeVideoCollectionDto ToDto(this YouTubeVideoCollection youTubeVideoCollection)
 {
     return(new ()
     {
         YouTubeVideoCollectionId = youTubeVideoCollection.YouTubeVideoCollectionId
     });
 }
예제 #2
0
            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()
                });
            }