public HttpResponseMessage Save(CreditNote Sr) { if (Sr.ID > 0) { return(Request.CreateResponse(HttpStatusCode.OK, Sr.Update())); } else { return(Request.CreateResponse(HttpStatusCode.OK, Sr.Save())); } }