public IHttpActionResult PutBI_BATCALC(int id, BI_BATCALC bI_BATCALC) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != bI_BATCALC.IdCalcBI) { return(BadRequest()); } db.Entry(bI_BATCALC).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!BI_BATCALCExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult GetBI_BATCALC(int id) { BI_BATCALC bI_BATCALC = db.BI_BATCALC.Find(id); if (bI_BATCALC == null) { return(NotFound()); } return(Ok(bI_BATCALC)); }
public IHttpActionResult PostBI_BATCALC(BI_BATCALC bI_BATCALC) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.BI_BATCALC.Add(bI_BATCALC); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = bI_BATCALC.IdCalcBI }, bI_BATCALC)); }
public IHttpActionResult DeleteBI_BATCALC(int id) { BI_BATCALC bI_BATCALC = db.BI_BATCALC.Find(id); if (bI_BATCALC == null) { return(NotFound()); } db.BI_BATCALC.Remove(bI_BATCALC); db.SaveChanges(); return(Ok(bI_BATCALC)); }