Example #1
0
        public IHttpActionResult ById(int id)
        {
            var artist = this.GetArtistById(id);
            var model  = ArtistServiceModel.ConvertFromArtist(artist);

            return(Ok(model));
        }
Example #2
0
        public HttpResponseMessage Delete(int id)
        {
            var artist = this.GetArtistById(id);

            this.data.Artists.Delete(artist);

            var model = ArtistServiceModel.ConvertFromArtist(artist);

            var response = this.Request.CreateResponse(HttpStatusCode.OK, model);

            return(response);
        }