Example #1
0
        public Artist Edit(Artist artist)
        {
            try
            {
                var artbs = new ArtistBusiness();
                return(artbs.EditarArtista(artist));
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }
        public void Edit(Artist artist)
        {
            try
            {
                var bc = new ArtistBusiness();
                bc.EditarArtista(artist);
            }
            catch (Exception ex)
            {
                // Repack to Http error.
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }
Example #3
0
 public Artist EditarArtista(Artist artist)
 {
     return(biz.EditarArtista(artist));
 }