// POST: odata/T_RTRPT_PUMP_KTMXBWSO2 public IHttpActionResult Post(T_RTRPT_PUMP_KTMXBWSO2 T_RTRPT_PUMP_KTMXBWSO2) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.T_RTRPT_PUMP_KTMXBWSO2.Add(T_RTRPT_PUMP_KTMXBWSO2); db.SaveChanges(); return(Created(T_RTRPT_PUMP_KTMXBWSO2)); }
// DELETE: odata/T_RTRPT_PUMP_KTMXBWSO2(5) public IHttpActionResult Delete([FromODataUri] decimal key) { T_RTRPT_PUMP_KTMXBWSO2 T_RTRPT_PUMP_KTMXBWSO2 = db.T_RTRPT_PUMP_KTMXBWSO2.Find(key); if (T_RTRPT_PUMP_KTMXBWSO2 == null) { return(NotFound()); } db.T_RTRPT_PUMP_KTMXBWSO2.Remove(T_RTRPT_PUMP_KTMXBWSO2); db.SaveChanges(); return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult Patch([FromODataUri] decimal key, Delta <T_RTRPT_PUMP_KTMXBWSO2> patch) { Validate(patch.GetEntity()); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } T_RTRPT_PUMP_KTMXBWSO2 T_RTRPT_PUMP_KTMXBWSO2 = db.T_RTRPT_PUMP_KTMXBWSO2.Find(key); if (T_RTRPT_PUMP_KTMXBWSO2 == null) { return(NotFound()); } patch.Patch(T_RTRPT_PUMP_KTMXBWSO2); try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!T_RTRPT_PUMP_KTMXBWSO2Exists(key)) { return(NotFound()); } else { throw; } } return(Updated(T_RTRPT_PUMP_KTMXBWSO2)); }