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> Putfinance_period(int id, finance_period finance_period) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != finance_period.id) { return(BadRequest()); } db.Entry(finance_period).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!finance_periodExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }