Exemplo n.º 1
0
        /// <summary>
        /// GetAsync song according to ID
        /// </summary>
        /// <param name="id">ID of the song</param>
        /// <returns>The song with given ID, null otherwise</returns>
        public async Task <SongDto> GetSongAsync(Guid id)
        {
            using (UnitOfWorkProvider.Create())
            {
                var songDto = await songService.GetAsync(id);

                return(songDto);
            }
        }
Exemplo n.º 2
0
 public async Task <Song> GetByIdAsync(string id)
 {
     return(await Task.FromResult(await _songService.GetAsync(new ObjectId(id))));
 }