public void DeleteInvoice(global::ApplicationData.Implementation.Invoice entity) { if (entity.EntityState == global::System.Data.EntityState.Detached) { this.ObjectContext.Invoices.Attach(entity); } this.DeleteEntity(entity); }
public void InsertInvoice(global::ApplicationData.Implementation.Invoice entity) { if (entity.EntityState != global::System.Data.EntityState.Detached) { this.ObjectContext.ObjectStateManager.ChangeObjectState(entity, global::System.Data.EntityState.Added); } else { this.ObjectContext.Invoices.AddObject(entity); } }
public void UpdateInvoice(global::ApplicationData.Implementation.Invoice currentEntity) { global::System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified(this.ObjectContext.Invoices, currentEntity, this.ChangeSet.GetOriginal(currentEntity)); }