public void DeleteProduct(global::ApplicationData.Implementation.Product entity) { if (entity.EntityState == global::System.Data.EntityState.Detached) { this.ObjectContext.Products.Attach(entity); } this.DeleteEntity(entity); }
public void InsertProduct(global::ApplicationData.Implementation.Product entity) { if (entity.EntityState != global::System.Data.EntityState.Detached) { this.ObjectContext.ObjectStateManager.ChangeObjectState(entity, global::System.Data.EntityState.Added); } else { this.ObjectContext.Products.AddObject(entity); } }
public void UpdateProduct(global::ApplicationData.Implementation.Product currentEntity) { global::System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified(this.ObjectContext.Products, currentEntity, this.ChangeSet.GetOriginal(currentEntity)); }