public void Update(Class @class) { Class _class = db.Classes.Find(@class.Id); db.Entry(_class).CurrentValues.SetValues(@class); //db.Entry(@class).State = EntityState.Detached; }
public void Update(Subject subject) { db.Entry(subject).State = EntityState.Modified; }
public void Update(Teacher teacher) { db.Entry(teacher).State = EntityState.Modified; }
public void Update(Pupil pupil) { db.Entry(pupil).State = EntityState.Modified; }