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