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