public IHttpActionResult PutIssuerFASTag(int id, IssuerFASTag issuerFASTag) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != issuerFASTag.srno) { return(BadRequest()); } db.Entry(issuerFASTag).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!IssuerFASTagExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutUser_Vehicle(long id, User_Vehicle user_Vehicle) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != user_Vehicle.srno) { return(BadRequest()); } db.Entry(user_Vehicle).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!User_VehicleExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutTollPlaza(int id, TollPlaza tollPlaza) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tollPlaza.id) { return(BadRequest()); } db.Entry(tollPlaza).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!TollPlazaExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }