public IHttpActionResult PutD(int id, D d) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != d.Id) { return(BadRequest()); } db.Entry(d).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!DExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public void Update(Record record) { db.Entry(record).State = EntityState.Modified; }
public void Update(T obj) { context.Entry(obj).State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); }
public void Update(Patient patient) { db.Entry(patient).State = EntityState.Modified; }
public void Update(Doctor doctor) { db.Entry(doctor).State = EntityState.Modified; }
public void Update(Schedule schedule) { db.Entry(schedule).State = EntityState.Modified; }