示例#1
0
 public void Delete(Supervisor entity)
 {
     this.DbContext.Supervisors.DeleteObject(entity);
 }
示例#2
0
 public void Update(Supervisor entity)
 {
     var e = this.FindById(entity.Id);
     if (e != null) {
         e.UserId = entity.UserId;
         e.Type = entity.Type;
     }
     //if (this.FindById(entity.Id) != null) {
     //	this.DbContext.Supervisors.Attach(entity);
     //	this.DbContext.ObjectStateManager.ChangeObjectState(entity, System.Data.EntityState.Modified);
     //}
 }
示例#3
0
 public void Add(Supervisor entity)
 {
     this.DbContext.Supervisors.AddObject(entity);
 }