Beispiel #1
0
 public DynamicManyToOneAssociationType(DynamicObjectType objectType, DynamicManyToOneRoleType roleType)
 {
     this.ObjectType          = objectType;
     roleType.AssociationType = this;
     this.RoleType            = roleType;
     this.SingularName        = roleType.SingularNameForAssociation(objectType);
     this.PluralName          = roleType.PluralNameForAssociation(objectType);
 }
Beispiel #2
0
        public DynamicManyToOneRoleType AddManyToOne(DynamicObjectType roleObjectType, string roleName)
        {
            var roleType = new DynamicManyToOneRoleType(roleObjectType, roleName);

            this.AddRoleType(roleType);

            var associationType = new DynamicManyToOneAssociationType(this, roleType);

            roleObjectType.AddAssociationType(associationType);

            this.Meta.ResetDerivations();

            return(roleType);
        }
Beispiel #3
0
 public void Deconstruct(out DynamicManyToOneAssociationType associationType, out DynamicManyToOneRoleType roleType)
 {
     associationType = this.AssociationType;
     roleType        = this;
 }