Exemplo n.º 1
0
 public void Delete(Supervisor entity)
 {
     this.DbContext.Supervisors.DeleteObject(entity);
 }
Exemplo n.º 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);
     //}
 }
Exemplo n.º 3
0
 public void Add(Supervisor entity)
 {
     this.DbContext.Supervisors.AddObject(entity);
 }