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); }
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); }