// PUT api/Excel/5 public IHttpActionResult Putvw_AnnenbergSymposiumExcel(int id, vw_AnnenbergSymposiumExcel vw_annenbergsymposiumexcel) { if (!ModelState.IsValid) { return BadRequest(ModelState); } if (id != vw_annenbergsymposiumexcel.Reg_ID) { return BadRequest(); } db.Entry(vw_annenbergsymposiumexcel).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!vw_AnnenbergSymposiumExcelExists(id)) { return NotFound(); } else { throw; } } return StatusCode(HttpStatusCode.NoContent); }
public IHttpActionResult Postvw_AnnenbergSymposiumExcel(vw_AnnenbergSymposiumExcel vw_annenbergsymposiumexcel) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.vw_AnnenbergSymposiumExcel.Add(vw_annenbergsymposiumexcel); try { db.SaveChanges(); } catch (DbUpdateException) { if (vw_AnnenbergSymposiumExcelExists(vw_annenbergsymposiumexcel.Reg_ID)) { return Conflict(); } else { throw; } } return CreatedAtRoute("DefaultApi", new { id = vw_annenbergsymposiumexcel.Reg_ID }, vw_annenbergsymposiumexcel); }