示例#1
0
        public void Update(Class @class)
        {
            Class _class = db.Classes.Find(@class.Id);

            db.Entry(_class).CurrentValues.SetValues(@class);
            //db.Entry(@class).State = EntityState.Detached;
        }
示例#2
0
 public void Update(Subject subject)
 {
     db.Entry(subject).State = EntityState.Modified;
 }
示例#3
0
 public void Update(Teacher teacher)
 {
     db.Entry(teacher).State = EntityState.Modified;
 }
示例#4
0
 public void Update(Pupil pupil)
 {
     db.Entry(pupil).State = EntityState.Modified;
 }