public static NavigationPropertyEntityInfo Many(string name, EntityInfo otherSideEntity)
        {
            var itemType = otherSideEntity.GetTypeUsage();
            var type = typeof (ICollection<>).ToGenericUsageInfo(itemType);
            var initializationType = typeof (HashSet<>).ToGenericUsageInfo(itemType);

            return new NavigationPropertyEntityInfo(name, type, initializationType);
        }
예제 #2
0
        public static NavigationPropertyEntityInfo Many(string name, EntityInfo otherSideEntity)
        {
            var itemType           = otherSideEntity.GetTypeUsage();
            var type               = typeof(ICollection <>).ToGenericUsageInfo(itemType);
            var initializationType = typeof(HashSet <>).ToGenericUsageInfo(itemType);

            return(new NavigationPropertyEntityInfo(name, type, initializationType));
        }
 public static NavigationPropertyEntityInfo One(string name, EntityInfo otherSideEntity)
 {
     var type = otherSideEntity.GetTypeUsage();
     return new NavigationPropertyEntityInfo(name, type, null);
 }
예제 #4
0
        public static NavigationPropertyEntityInfo One(string name, EntityInfo otherSideEntity)
        {
            var type = otherSideEntity.GetTypeUsage();

            return(new NavigationPropertyEntityInfo(name, type, null));
        }