public async Task <IActionResult> GetAll() { var operationResult = await songService.GetAll(); if (!operationResult.IsSuccess) { return(NotFound(operationResult.Message)); } return(Ok(operationResult.Result)); }
public ActionResult <IEnumerable <Song> > GetSongs() { var result = _songService.GetAll(); if (!result.Success) { return(BadRequest(result)); } return(Ok(result.ResultData)); }
public async Task <IEnumerable <Song> > Get(string categoryId, string artistId) { if (!string.IsNullOrEmpty(categoryId)) { return(await _songService.GetByCategory(categoryId)); } if (!string.IsNullOrEmpty(artistId)) { return(await _songService.GetByArtist(artistId)); } return(await _songService.GetAll()); }
public async Task Load() { Songs = await _songService.GetAll(); SongCategories = await _songCategoryService.GetAll(); CategoryListActive = new List <int>(); PlaylistItemUCMockData = new List <PlaylistItemUC>(); LoadCategory(); SetStatusFilter(false); LoadPlaylistItem(new Action <bool>(SetStatusFilter)); }
new public async Task Load() { Songs = await _songService.GetAll(); SongCategories = new Dictionary <int, string>(); foreach (var item in await _songCategoryService.GetAll()) { SongCategories.Add(item.ID, item.DisplayName); } LoadListView(); if (Songs.Count > 0) { CurrentSong = Songs[0]; LoadDetail(); } }
// Load item from Static new public async Task Load() { flpPlaylist.Size = new Size(flpPlaylist.Size.Width, flpPlaylist.Size.Height + 300); flpFavoriteList.Size = new Size(flpFavoriteList.Size.Width, flpFavoriteList.Size.Height + 300); Songs = await _songService.GetAll(); SongCategories = await _songCategoryService.GetAll(); CategoryListActive = new List <int>(); PlaylistItemPUCMockData = new List <PlaylistItemPUC>(); LoadCategory(); SetStatusFilter(false); LoadPlaylistItem(new Action <bool>(SetStatusFilter)); }
public ActionResult <IEnumerable <Song> > Get() { return(Ok(songService.GetAll().Select(s => new SongDTO(s)).ToList())); }
public IQueryable <Song> GetAll() { return(_songService.GetAll()); }
public IActionResult GetAll() { var response = _service.GetAll(); return(Ok(response)); }