// POST: odata/mdArrangementAnnunciationRows public async Task <IHttpActionResult> Post(mdArrangementAnnunciationRow mdArrangementAnnunciationRow) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.mdArrangementAnnunciationRows.Add(mdArrangementAnnunciationRow); await db.SaveChangesAsync(); return(Created(mdArrangementAnnunciationRow)); }
// DELETE: odata/mdArrangementAnnunciationRows(5) public async Task <IHttpActionResult> Delete([FromODataUri] int key) { mdArrangementAnnunciationRow mdArrangementAnnunciationRow = await db.mdArrangementAnnunciationRows.FindAsync(key); if (mdArrangementAnnunciationRow == null) { return(NotFound()); } db.mdArrangementAnnunciationRows.Remove(mdArrangementAnnunciationRow); await db.SaveChangesAsync(); return(StatusCode(HttpStatusCode.NoContent)); }
// PUT: odata/mdArrangementAnnunciationRows(5) public async Task <IHttpActionResult> Put([FromODataUri] int key, Delta <mdArrangementAnnunciationRow> patch) { Validate(patch.GetEntity()); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } mdArrangementAnnunciationRow mdArrangementAnnunciationRow = await db.mdArrangementAnnunciationRows.FindAsync(key); if (mdArrangementAnnunciationRow == null) { return(NotFound()); } patch.Put(mdArrangementAnnunciationRow); try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!mdArrangementAnnunciationRowExists(key)) { return(NotFound()); } else { throw; } } return(Updated(mdArrangementAnnunciationRow)); }