public void InsertProduct_part_time(product_part_time product_part_time) { if ((product_part_time.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(product_part_time, EntityState.Added); } else { this.ObjectContext.product_part_time.AddObject(product_part_time); } }
public void DeleteProduct_part_time(product_part_time product_part_time) { if ((product_part_time.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(product_part_time, EntityState.Deleted); } else { this.ObjectContext.product_part_time.Attach(product_part_time); this.ObjectContext.product_part_time.DeleteObject(product_part_time); } }
public void UpdateProduct_part_time(product_part_time currentproduct_part_time) { this.ObjectContext.product_part_time.AttachAsModified(currentproduct_part_time, this.ChangeSet.GetOriginal(currentproduct_part_time)); }