/// <summary>Creates a new, empty Category1Entity object.</summary> /// <returns>A new, empty Category1Entity object.</returns> public override IEntity2 Create() { IEntity2 toReturn = new Category1Entity(); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewCategory1 // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }
/// <summary>Creates a new Category1Entity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary> /// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param> /// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns> public override IEntity2 Create(IEntityFields2 fields) { IEntity2 toReturn = new Category1Entity(fields); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewCategory1UsingFields // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }
/// <summary> setups the sync logic for member _category1</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCategory1(IEntity2 relatedEntity) { if (_category1 != relatedEntity) { DesetupSyncCategory1(true, true); _category1 = (Category1Entity)relatedEntity; base.PerformSetupSyncRelatedEntity(_category1, new PropertyChangedEventHandler(OnCategory1PropertyChanged), "Category1", MainPageBannerEntity.Relations.Category1EntityUsingFkCategory1Id, true, new string[] { }); } }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _category1 = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
protected MainPageBannerEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _category1 = (Category1Entity)info.GetValue("_category1", typeof(Category1Entity)); if (_category1 != null) { _category1.AfterSave += new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> setups the sync logic for member _category1</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCategory1(IEntity2 relatedEntity) { if(_category1!=relatedEntity) { DesetupSyncCategory1(true, true); _category1 = (Category1Entity)relatedEntity; base.PerformSetupSyncRelatedEntity( _category1, new PropertyChangedEventHandler( OnCategory1PropertyChanged ), "Category1", Category2Entity.Relations.Category1EntityUsingFkCategory1Id, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _category1</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 DesetupSyncCategory1(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity( _category1, new PropertyChangedEventHandler( OnCategory1PropertyChanged ), "Category1", Category2Entity.Relations.Category1EntityUsingFkCategory1Id, true, signalRelatedEntity, "Category2", resetFKFields, new int[] { (int)Category2FieldIndex.FkCategory1Id } ); _category1 = null; }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _category2Post = null; _postCollectionViaCategory2Post = null; _category1 = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
protected Category2Entity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _category2Post = (EntityCollection<Category2PostEntity>)info.GetValue("_category2Post", typeof(EntityCollection<Category2PostEntity>)); _postCollectionViaCategory2Post = (EntityCollection<PostEntity>)info.GetValue("_postCollectionViaCategory2Post", typeof(EntityCollection<PostEntity>)); _category1 = (Category1Entity)info.GetValue("_category1", typeof(Category1Entity)); if(_category1!=null) { _category1.AfterSave+=new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary> /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param> /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns> public override RelationCollection GetRelationsForFieldOfType(string fieldName) { return(Category1Entity.GetRelationsForField(fieldName)); }
/// <summary> Removes the sync logic for member _category1</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 DesetupSyncCategory1(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity(_category1, new PropertyChangedEventHandler(OnCategory1PropertyChanged), "Category1", MainPageBannerEntity.Relations.Category1EntityUsingFkCategory1Id, true, signalRelatedEntity, "MainPageBanner", resetFKFields, new int[] { (int)MainPageBannerFieldIndex.FkCategory1Id }); _category1 = null; }