Esempio n. 1
0
        private bool IsPrincipalEnd(NavigationPropertyMetadata prop)
        {
            switch (prop.Multiplicity)
            {
            case NavigationPropertyMultiplicity.Many:
                return(prop.TargetMultiplicity != NavigationPropertyMultiplicity.Many);

            case NavigationPropertyMultiplicity.One:
                return(false);

            case NavigationPropertyMultiplicity.ZeroOrOne:
                return(prop.TargetMultiplicity == NavigationPropertyMultiplicity.One);
            }

            return(false);
        }
Esempio n. 2
0
 public void AddNavigationProperty(EntityMetadata entityType, string propertyName, NavigationPropertyMetadata navMetadata)
 {
     _navigationProperties[entityType].Add(propertyName, navMetadata);
 }