public async Task<IHttpActionResult> Putscope_exceeding(int id, scope_exceeding scope_exceeding) { if (!ModelState.IsValid) { return BadRequest(ModelState); } if (id != scope_exceeding.id) { return BadRequest(); } db.Entry(scope_exceeding).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!scope_exceedingExists(id)) { return NotFound(); } else { throw; } } return StatusCode(HttpStatusCode.NoContent); }
public async Task<IHttpActionResult> Postscope_exceeding(scope_exceeding scope_exceeding) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.scope_exceeding.Add(scope_exceeding); await db.SaveChangesAsync(); return CreatedAtRoute("DefaultApi", new { id = scope_exceeding.id }, scope_exceeding); }