public void DeletePatient(global::ApplicationData.Implementation.Patient entity) { if (entity.EntityState == global::System.Data.EntityState.Detached) { this.ObjectContext.Patients.Attach(entity); } this.DeleteEntity(entity); }
public void InsertPatient(global::ApplicationData.Implementation.Patient entity) { if (entity.EntityState != global::System.Data.EntityState.Detached) { this.ObjectContext.ObjectStateManager.ChangeObjectState(entity, global::System.Data.EntityState.Added); } else { this.ObjectContext.Patients.AddObject(entity); } }
public void UpdatePatient(global::ApplicationData.Implementation.Patient currentEntity) { global::System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified(this.ObjectContext.Patients, currentEntity, this.ChangeSet.GetOriginal(currentEntity)); }