コード例 #1
0
        public ViewResult Albums(int artistId)
        {
            var albums = _albums.GetAlbumsByArtistId(artistId);

            ViewData["artist"] = _artists.GetArtist(artistId).Name;

            return(View(albums));
        }
コード例 #2
0
        public IHttpActionResult GetArtist(string id)
        {
            var result = _Artists.GetArtist(id);

            if (result != null)
            {
                return(Ok(result));
            }
            else
            {
                return(NotFound());
            }
        }