Ejemplo n.º 1
0
        public void DeletePatient(global::ApplicationData.Implementation.Patient entity)
        {
            if (entity.EntityState == global::System.Data.EntityState.Detached)
            {
                this.ObjectContext.Patients.Attach(entity);
            }

            this.DeleteEntity(entity);
        }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 public void UpdatePatient(global::ApplicationData.Implementation.Patient currentEntity)
 {
     global::System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified(this.ObjectContext.Patients, currentEntity, this.ChangeSet.GetOriginal(currentEntity));
 }