public async Task <ActionResult <IEnumerable <MusicResource> > > GetMusic() { var musics = await _musicService.GetAllWithArtists(); if (musics == null) { return(NotFound()); } var musicsResource = _mapper.Map <IEnumerable <Music>, IEnumerable <MusicResource> >(musics); return(Ok(musicsResource)); }
public async Task <ActionResult <IEnumerable <Music> > > GetAllMusics() { var musics = _musicService.GetAllWithArtists(); return(Ok(musics)); }