/// <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 }
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; }
/// <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; }
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; }
public bool Update(AspnetPathsEntity _AspnetPathsEntity, RelationPredicateBucket filter) { bool toReturn = false; using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.UpdateEntitiesDirectly(_AspnetPathsEntity, filter); toReturn = true; } return toReturn; }
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; }
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; }
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; }
public AspnetPathsEntity Insert(AspnetPathsEntity _AspnetPathsEntity) { using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter()) { adapter.SaveEntity(_AspnetPathsEntity, true); } return _AspnetPathsEntity; }