/// <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); } }
public async Task <Song> GetByIdAsync(string id) { return(await Task.FromResult(await _songService.GetAsync(new ObjectId(id)))); }