MonoSoftware.MonoX.DAL.EntityClasses.PollEntity.SetRelatedEntity C# (CSharp) 메소드

SetRelatedEntity() 보호된 메소드

Sets the internal parameter related to the fieldname passed to the instance relatedEntity.
protected SetRelatedEntity ( IEntityCore relatedEntity, string fieldName ) : void
relatedEntity IEntityCore Instance to set as the related entity of type entityType
fieldName string Name of field mapped onto the relation which resolves in the instance relatedEntity
리턴 void
        protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
        {
            switch(fieldName)
            {
                case "AspnetApplication":
                    SetupSyncAspnetApplication(relatedEntity);
                    break;
                case "AspnetUser":
                    SetupSyncAspnetUser(relatedEntity);
                    break;
                case "PollAnswers":
                    this.PollAnswers.Add((PollAnswerEntity)relatedEntity);
                    break;
                case "PollLocalizations":
                    this.PollLocalizations.Add((PollLocalizationEntity)relatedEntity);
                    break;
                case "SnRelationshipss":
                    this.SnRelationshipss.Add((SnRelationshipEntity)relatedEntity);
                    break;
                default:
                    break;
            }
        }