public async Task <List <PlaylistViewModel> > GetAllPlaylistAsync(CancellationToken ct = default(CancellationToken)) { var playlists = PlaylistCoverter.ConvertList(await _playlistRepository.GetAllAsync(ct)); foreach (var playlist in playlists) { playlist.Tracks = await GetTrackByPlaylistIdIdAsync(playlist.PlaylistId, ct); } return(playlists.ToList()); }
public async Task <IActionREsult> Get() { try { return(Ok(await _playRepo.GetAllAsync())); } catch (Exception ex) { return(StatusCode(500, ex)); } }
public async Task <IEnumerable <Playlist> > GetAllAsync(int accountId) { return(await _playlistRepository.GetAllAsync(accountId)); }