public async Task <ServiceResult <PlaylistModel> > Get(string id) { var serviceResult = new ServiceResult <PlaylistModel>(); var result = await _playlistRepository.Get(id); if (result.Success) { serviceResult.Success = true; serviceResult.Result = result.Entity; } else { serviceResult.Error.Code = ErrorStatusCode.BudRequest; serviceResult.Error.Description = result.Message; } return(serviceResult); }
public Playlist GetById(long id) { return(_playlistRepository.Get(id)); }
private Task <Playlist> GetPlaylist() { return(_playlistRepository.Get(_testOptions.TestPlaylistId)); }