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