public async Task<IHttpActionResult> PutIdentityBinderLinkHistory(long id, IdentityBinderLinkHistory identityBinderLinkHistory) { if (!ModelState.IsValid) { return BadRequest(ModelState); } if (id != identityBinderLinkHistory.AuditId) { return BadRequest(); } db.Entry(identityBinderLinkHistory).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!IdentityBinderLinkHistoryExists(id)) { return NotFound(); } else { throw; } } return StatusCode(HttpStatusCode.NoContent); }
// POST: odata/IdentityBinderLinkHistory public async Task<IHttpActionResult> Post(IdentityBinderLinkHistory identityBinderLinkHistory) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.IdentityBinderLinkHistory.Add(identityBinderLinkHistory); await db.SaveChangesAsync(); return Created(identityBinderLinkHistory); }
public async Task<IHttpActionResult> PostIdentityBinderLinkHistory(IdentityBinderLinkHistory identityBinderLinkHistory) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.IdentityBinderLinkHistory.Add(identityBinderLinkHistory); await db.SaveChangesAsync(); return CreatedAtRoute("DefaultApi", new { id = identityBinderLinkHistory.AuditId }, identityBinderLinkHistory); }