public Artist GetById(int id) { try { var artbs = new ArtistBusiness(); return(artbs.GetbyID(id)); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }
public void Remove(int id) { try { var artbs = new ArtistBusiness(); var artist = artbs.GetbyID(id); artbs.Borrar(artist); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }