예제 #1
0
        public async Task <Song[]> RunAsync()
        {
            SetConnection();
            var searchListRequest = YoutubeService.Search.List("snippet");

            searchListRequest.Q          = Genre;
            searchListRequest.MaxResults = SongsQuantity;
            var searchListResponse = await searchListRequest.ExecuteAsync();

            return(_musicConverter.Convert(searchListResponse));
        }
예제 #2
0
 public MusicBO Add(MusicBO music)
 {
     using (var uow = facade.UnitOfWork)
     {
         var newMusic = uow.MusicRepository.Add(conv.Convert(music));
         uow.Complete();
         return(conv.Convert(newMusic));
     }
 }