MonoSoftware.MonoX.DAL.EntityClasses.OaConsumerEntity.UnsetRelatedEntity C# (CSharp) Method

UnsetRelatedEntity() protected method

Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity()
protected UnsetRelatedEntity ( IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne ) : void
relatedEntity IEntityCore Instance to unset as the related entity of type entityType
fieldName string Name of field mapped onto the relation which resolves in the instance relatedEntity
signalRelatedEntityManyToOne bool if set to true it will notify the manytoone side, if applicable.
return void
        protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
        {
            switch(fieldName)
            {
                case "OaTokens":
                    this.PerformRelatedEntityRemoval(this.OaTokens, relatedEntity, signalRelatedEntityManyToOne);
                    break;
                case "SnEvents":
                    this.PerformRelatedEntityRemoval(this.SnEvents, relatedEntity, signalRelatedEntityManyToOne);
                    break;
                default:
                    break;
            }
        }