public void DeletePacient(global::ApplicationData.Implementation.Pacient entity) { if (entity.EntityState == global::System.Data.EntityState.Detached) { this.ObjectContext.Pacients.Attach(entity); } this.DeleteEntity(entity); }
public void InsertPacient(global::ApplicationData.Implementation.Pacient entity) { if (entity.EntityState != global::System.Data.EntityState.Detached) { this.ObjectContext.ObjectStateManager.ChangeObjectState(entity, global::System.Data.EntityState.Added); } else { this.ObjectContext.Pacients.AddObject(entity); } }
public void UpdatePacient(global::ApplicationData.Implementation.Pacient currentEntity) { global::System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified(this.ObjectContext.Pacients, currentEntity, this.ChangeSet.GetOriginal(currentEntity)); }