Ejemplo n.º 1
0
 public void InsertImportant_part(important_part important_part)
 {
     if ((important_part.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(important_part, EntityState.Added);
     }
     else
     {
         this.ObjectContext.important_part.AddObject(important_part);
     }
 }
Ejemplo n.º 2
0
 public void DeleteImportant_part(important_part important_part)
 {
     if ((important_part.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(important_part, EntityState.Deleted);
     }
     else
     {
         this.ObjectContext.important_part.Attach(important_part);
         this.ObjectContext.important_part.DeleteObject(important_part);
     }
 }
Ejemplo n.º 3
0
 public void UpdateImportant_part(important_part currentimportant_part)
 {
     this.ObjectContext.important_part.AttachAsModified(currentimportant_part, this.ChangeSet.GetOriginal(currentimportant_part));
 }