Пример #1
0
        public void DeletePrincipal(global::ApplicationData.Implementation.Principal entity)
        {
            if (entity.EntityState == global::System.Data.EntityState.Detached)
            {
                this.ObjectContext.Principals.Attach(entity);
            }

            this.DeleteEntity(entity);
        }
Пример #2
0
 public void InsertPrincipal(global::ApplicationData.Implementation.Principal entity)
 {
     if (entity.EntityState != global::System.Data.EntityState.Detached)
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(entity, global::System.Data.EntityState.Added);
     }
     else
     {
         this.ObjectContext.Principals.AddObject(entity);
     }
 }
Пример #3
0
 public void UpdatePrincipal(global::ApplicationData.Implementation.Principal currentEntity)
 {
     global::System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified(this.ObjectContext.Principals, currentEntity, this.ChangeSet.GetOriginal(currentEntity));
 }