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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
        public static NavigationPropertyEntityInfo One(string name, EntityInfo otherSideEntity)
        {
            var type = otherSideEntity.GetTypeUsage();

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