예제 #1
0
 /// <summary> setups the sync logic for member _aspnetPaths</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncAspnetPaths(IEntityCore relatedEntity)
 {
     if (_aspnetPaths != relatedEntity)
     {
         DesetupSyncAspnetPaths(true, true);
         _aspnetPaths = (AspnetPathsEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_aspnetPaths, new PropertyChangedEventHandler(OnAspnetPathsPropertyChanged), "AspnetPaths", MonoSoftware.MonoX.DAL.RelationClasses.StaticAspnetPersonalizationPerUserRelations.AspnetPathsEntityUsingPathIdStatic, true, new string[] {  });
     }
 }
 protected AspnetPersonalizationAllUsersEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _aspnetPaths = (AspnetPathsEntity)info.GetValue("_aspnetPaths", typeof(AspnetPathsEntity));
         if (_aspnetPaths != null)
         {
             _aspnetPaths.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
예제 #3
0
 public bool Delete(Guid PathId)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         AspnetPathsEntity _AspnetPathsEntity = new AspnetPathsEntity(PathId);
         if (adapter.FetchEntity(_AspnetPathsEntity))
         {
             adapter.DeleteEntity(_AspnetPathsEntity);
             toReturn = true;
         }
     }
     return toReturn;
 }
예제 #4
0
 /// <summary> Removes the sync logic for member _aspnetPaths</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncAspnetPaths(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_aspnetPaths, new PropertyChangedEventHandler(OnAspnetPathsPropertyChanged), "AspnetPaths", MonoSoftware.MonoX.DAL.RelationClasses.StaticAspnetPersonalizationPerUserRelations.AspnetPathsEntityUsingPathIdStatic, true, signalRelatedEntity, "AspnetPersonalizationPerUser", resetFKFields, new int[] { (int)AspnetPersonalizationPerUserFieldIndex.PathId });
     _aspnetPaths = null;
 }
예제 #5
0
        public bool Update(Guid ApplicationId, Guid PathId, string Path, string LoweredPath)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                AspnetPathsEntity _AspnetPathsEntity = new AspnetPathsEntity(PathId);
                if (adapter.FetchEntity(_AspnetPathsEntity))
                {

                    _AspnetPathsEntity.ApplicationId = ApplicationId;
                    _AspnetPathsEntity.Path = Path;
                    _AspnetPathsEntity.LoweredPath = LoweredPath;
                    adapter.SaveEntity(_AspnetPathsEntity, true);
                    toReturn = true;
                }
            }
            return toReturn;
        }
예제 #6
0
 public bool Update(AspnetPathsEntity _AspnetPathsEntity, RelationPredicateBucket filter)
 {
     bool toReturn = false;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.UpdateEntitiesDirectly(_AspnetPathsEntity, filter);
         toReturn = true;
     }
     return toReturn;
 }
예제 #7
0
        public bool Update(AspnetPathsEntity _AspnetPathsEntity)
        {
            bool toReturn = false;
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {
                RelationPredicateBucket filter = new RelationPredicateBucket();
                IPredicateExpression _PredicateExpression = new PredicateExpression();
                _PredicateExpression.Add(AspnetPathsFields.PathId == _AspnetPathsEntity.PathId);

                filter.PredicateExpression.Add(_PredicateExpression);

                adapter.UpdateEntitiesDirectly(_AspnetPathsEntity, filter);
                toReturn = true;
            }
            return toReturn;
        }
예제 #8
0
 public AspnetPathsEntity SelectOne(Guid PathId)
 {
     AspnetPathsEntity toReturn = null;
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         AspnetPathsEntity _AspnetPathsEntity = new AspnetPathsEntity(PathId);
         if (adapter.FetchEntity(_AspnetPathsEntity))
         {
             toReturn = _AspnetPathsEntity;
         }
     }
     return toReturn;
 }
예제 #9
0
        public AspnetPathsEntity Insert(Guid ApplicationId, string Path, string LoweredPath)
        {
            AspnetPathsEntity _AspnetPathsEntity = new AspnetPathsEntity();
            using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
            {

                _AspnetPathsEntity.ApplicationId = ApplicationId;
                _AspnetPathsEntity.Path = Path;
                _AspnetPathsEntity.LoweredPath = LoweredPath;
                adapter.SaveEntity(_AspnetPathsEntity, true);
            }
            return _AspnetPathsEntity;
        }
예제 #10
0
 public AspnetPathsEntity Insert(AspnetPathsEntity _AspnetPathsEntity)
 {
     using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
     {
         adapter.SaveEntity(_AspnetPathsEntity, true);
     }
     return _AspnetPathsEntity;
 }