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