예제 #1
0
        public async Task <ActionResult <IEnumerable <ArtistResource> > > GetArtist()
        {
            var artists = await _artistService.GetAllWithMusics();

            if (artists == null)
            {
                return(NotFound());
            }
            var artistsResource = _mapper.Map <IEnumerable <Artist>, IEnumerable <ArtistResource> >(artists);

            return(Ok(artistsResource));
        }