public async Task <ActionResult <IEnumerable <ArtistResource> > > GetAllArtists() { try { var artists = await _artistService.GetAllWithMusic(); if (artists == null) { return(BadRequest("There is no artist.")); } var artistsResources = _mapperService.Map <IEnumerable <Artist>, IEnumerable <ArtistResource> >(artists); return(Ok(artistsResources)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }