Ejemplo n.º 1
0
 public DynamicOneToManyAssociationType(DynamicObjectType objectType, DynamicOneToManyRoleType roleType)
 {
     this.ObjectType          = objectType;
     roleType.AssociationType = this;
     this.RoleType            = roleType;
     this.SingularName        = roleType.SingularNameForAssociation(objectType);
     this.PluralName          = roleType.PluralNameForAssociation(objectType);
 }
Ejemplo n.º 2
0
        public DynamicOneToManyRoleType AddOneToMany(DynamicObjectType roleObjectType, string roleName)
        {
            var roleType = new DynamicOneToManyRoleType(roleObjectType, roleName);

            this.AddRoleType(roleType);

            var associationType = new DynamicOneToManyAssociationType(this, roleType);

            roleObjectType.AddAssociationType(associationType);

            this.Meta.ResetDerivations();

            return(roleType);
        }