MonoSoftware.MonoX.DAL.EntityClasses.PrivacyLevelEntity.SetRelatedEntityProperty C# (CSharp) Méthode

SetRelatedEntityProperty() protected méthode

Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.
Used by prefetch path logic.
protected SetRelatedEntityProperty ( string propertyName, IEntityCore entity ) : void
propertyName string Name of the property.
entity IEntityCore Entity to set as an related entity
Résultat void
        protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
        {
            switch(propertyName)
            {
                case "PrivacyLevelDefinitions":
                    this.PrivacyLevelDefinitions.Add((PrivacyLevelDefinitionEntity)entity);
                    break;
                case "SnAlbums":
                    this.SnAlbums.Add((SnAlbumEntity)entity);
                    break;
                case "SnFiles":
                    this.SnFiles.Add((SnFileEntity)entity);
                    break;
                case "SnNotes":
                    this.SnNotes.Add((SnNoteEntity)entity);
                    break;
                case "UserProfile":
                    this.UserProfile.Add((UserProfileEntity)entity);
                    break;
                default:
                    this.OnSetRelatedEntityProperty(propertyName, entity);
                    break;
            }
        }