// POST: odata/PershingEx public async Task <IHttpActionResult> Post(vIsAAA1 vIsAAA1) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.vIsAAA1.Add(vIsAAA1); try { await db.SaveChangesAsync(); } catch (DbUpdateException) { if (vIsAAA1Exists(vIsAAA1.CUSIP)) { return(Conflict()); } else { throw; } } return(Created(vIsAAA1)); }
public async Task <IHttpActionResult> PutvIsAAA1(string id, vIsAAA1 vIsAAA1) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != vIsAAA1.CUSIP) { return(BadRequest()); } db.Entry(vIsAAA1).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!vIsAAA1Exists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> GetvIsAAA1(string id) { vIsAAA1 vIsAAA1 = await db.vIsAAA1.FindAsync(id); if (vIsAAA1 == null) { return(NotFound()); } return(Ok(vIsAAA1)); }
// DELETE: odata/PershingEx(5) public async Task <IHttpActionResult> Delete([FromODataUri] string key) { vIsAAA1 vIsAAA1 = await db.vIsAAA1.FindAsync(key); if (vIsAAA1 == null) { return(NotFound()); } db.vIsAAA1.Remove(vIsAAA1); await db.SaveChangesAsync(); return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> DeletevIsAAA1(string id) { vIsAAA1 vIsAAA1 = await db.vIsAAA1.FindAsync(id); if (vIsAAA1 == null) { return(NotFound()); } db.vIsAAA1.Remove(vIsAAA1); await db.SaveChangesAsync(); return(Ok(vIsAAA1)); }
// PUT: odata/PershingEx(5) public async Task <IHttpActionResult> Put([FromODataUri] string key, Delta <vIsAAA1> patch) { Validate(patch.GetEntity()); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } vIsAAA1 vIsAAA1 = await db.vIsAAA1.FindAsync(key); if (vIsAAA1 == null) { return(NotFound()); } patch.Put(vIsAAA1); try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!vIsAAA1Exists(key)) { return(NotFound()); } else { throw; } } return(Updated(vIsAAA1)); }