Ejemplo n.º 1
0
        public ResourceAssociations FindRequiredAssociations()
        {
            ResourceAssociations requiredAssociations = new ResourceAssociations();

            foreach (ResourceProperty prop in this.Properties.OfType <ResourceProperty>().Where(p => p.IsNavigation == true && p.Name != null))
            {
                if (prop.AssociationEnd.Multiplicity == Multiplicity.One)
                {
                    requiredAssociations.Add(prop.ResourceAssociation);
                }
            }
            return(requiredAssociations);
        }
Ejemplo n.º 2
0
        public ResourceAssociations FindAssociationsOfMultiplicity(Multiplicity resourceTypeEndMul, Multiplicity otherEndMul)
        {
            ResourceAssociations associationsFoundWithMul = new ResourceAssociations();

            foreach (ResourceProperty prop in this.Properties.OfType <ResourceProperty>().Where(p => p.IsNavigation == true && p.Name != null))
            {
                if (prop.AssociationEnd.Multiplicity == resourceTypeEndMul && prop.OtherAssociationEnd.Multiplicity == otherEndMul)
                {
                    associationsFoundWithMul.Add(prop.ResourceAssociation);
                }
            }
            return(associationsFoundWithMul);
        }