/// <summary>Creates a new, empty SysUserEntity object.</summary>
        /// <returns>A new, empty SysUserEntity object.</returns>
        public override IEntity2 Create()
        {
            IEntity2 toReturn = new SysUserEntity();

            // __LLBLGENPRO_USER_CODE_REGION_START CreateNewSysUser
            // __LLBLGENPRO_USER_CODE_REGION_END
            return toReturn;
        }
        /// <summary>Creates a new SysUserEntity 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 SysUserEntity(fields);

            // __LLBLGENPRO_USER_CODE_REGION_START CreateNewSysUserUsingFields
            // __LLBLGENPRO_USER_CODE_REGION_END
            return toReturn;
        }
Пример #3
0
 /// <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(SysUserEntity.GetRelationsForField(fieldName));
 }
Пример #4
0
        protected PostEntity(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            if(SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _category1Post = (EntityCollection<Category1PostEntity>)info.GetValue("_category1Post", typeof(EntityCollection<Category1PostEntity>));
                _category2Post = (EntityCollection<Category2PostEntity>)info.GetValue("_category2Post", typeof(EntityCollection<Category2PostEntity>));
                _postAttachment = (EntityCollection<PostAttachmentEntity>)info.GetValue("_postAttachment", typeof(EntityCollection<PostAttachmentEntity>));
                _postTag = (EntityCollection<PostTagEntity>)info.GetValue("_postTag", typeof(EntityCollection<PostTagEntity>));
                _teamPost = (EntityCollection<TeamPostEntity>)info.GetValue("_teamPost", typeof(EntityCollection<TeamPostEntity>));
                _category1CollectionViaCategory1Post = (EntityCollection<Category1Entity>)info.GetValue("_category1CollectionViaCategory1Post", typeof(EntityCollection<Category1Entity>));
                _category2CollectionViaCategory2Post = (EntityCollection<Category2Entity>)info.GetValue("_category2CollectionViaCategory2Post", typeof(EntityCollection<Category2Entity>));
                _tagCollectionViaPostTag = (EntityCollection<TagEntity>)info.GetValue("_tagCollectionViaPostTag", typeof(EntityCollection<TagEntity>));
                _teamCollectionViaTeamPost = (EntityCollection<TeamEntity>)info.GetValue("_teamCollectionViaTeamPost", typeof(EntityCollection<TeamEntity>));
                _sysUser = (SysUserEntity)info.GetValue("_sysUser", typeof(SysUserEntity));
                if(_sysUser!=null)
                {
                    _sysUser.AfterSave+=new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
Пример #5
0
 /// <summary> setups the sync logic for member _sysUser</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncSysUser(IEntity2 relatedEntity)
 {
     if(_sysUser!=relatedEntity)
     {
         DesetupSyncSysUser(true, true);
         _sysUser = (SysUserEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity( _sysUser, new PropertyChangedEventHandler( OnSysUserPropertyChanged ), "SysUser", PostEntity.Relations.SysUserEntityUsingFkAuthorId, true, new string[] {  } );
     }
 }
Пример #6
0
 /// <summary> Removes the sync logic for member _sysUser</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 DesetupSyncSysUser(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity( _sysUser, new PropertyChangedEventHandler( OnSysUserPropertyChanged ), "SysUser", PostEntity.Relations.SysUserEntityUsingFkAuthorId, true, signalRelatedEntity, "Post", resetFKFields, new int[] { (int)PostFieldIndex.FkAuthorId } );
     _sysUser = null;
 }
Пример #7
0
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _category1Post = null;
            _category2Post = null;
            _postAttachment = null;
            _postTag = null;
            _teamPost = null;
            _category1CollectionViaCategory1Post = null;
            _category2CollectionViaCategory2Post = null;
            _tagCollectionViaPostTag = null;
            _teamCollectionViaTeamPost = null;
            _sysUser = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }