//public HttpResponseMessage Save(string cod_estudio, string desc_estudio) public HttpResponseMessage Save([FromBody] Model.estudio estudio) { var message = new HttpResponseMessage(HttpStatusCode.InternalServerError); try { base.BusinessInstance.Add(estudio); message = Request.CreateResponse(HttpStatusCode.OK); } catch (Exception ex) //TODO: Change that with specific exception { message = Request.CreateResponse <Exception>(HttpStatusCode.InternalServerError, ex); } return(message); }
public HttpResponseMessage Update([FromBody] Model.estudio estudio) { var message = new HttpResponseMessage(HttpStatusCode.InternalServerError); try { //var estudio = new Model.estudio(); //estudio.cod_estudio = Convert.ToInt16(cod_estudio); //estudio.desc_estudio = desc_estudio; base.BusinessInstance.SaveOrUpdate(estudio); message = Request.CreateResponse(HttpStatusCode.OK); } catch (Exception ex) //TODO: Change that with specific exception { message = Request.CreateResponse <Exception>(HttpStatusCode.InternalServerError, ex); } return(message); }