// PUT api/VariantAssocMetric/5 public IHttpActionResult PutvwVariantAssocMetric(int id, vwVariantAssocMetric vwvariantassocmetric) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != vwvariantassocmetric.vwVariantAssocMetricId) { return(BadRequest()); } db.Entry(vwvariantassocmetric).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!vwVariantAssocMetricExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult GetvwVariantAssocMetric(int id) { vwVariantAssocMetric vwvariantassocmetric = db.vwVariantAssocMetrics.Find(id); if (vwvariantassocmetric == null) { return(NotFound()); } return(Ok(vwvariantassocmetric)); }
public IHttpActionResult PostvwVariantAssocMetric(vwVariantAssocMetric vwvariantassocmetric) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.vwVariantAssocMetrics.Add(vwvariantassocmetric); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = vwvariantassocmetric.vwVariantAssocMetricId }, vwvariantassocmetric)); }
public IHttpActionResult DeletevwVariantAssocMetric(int id) { vwVariantAssocMetric vwvariantassocmetric = db.vwVariantAssocMetrics.Find(id); if (vwvariantassocmetric == null) { return(NotFound()); } db.vwVariantAssocMetrics.Remove(vwvariantassocmetric); db.SaveChanges(); return(Ok(vwvariantassocmetric)); }