コード例 #1
0
        private static string ValidateLoadingScheme(LoadingScheme scheme, bool lazyLoad, string element)
        {
            switch (scheme)
            {
            case LoadingScheme.None:
                return(element + " can't be None (deprecated).");

            case LoadingScheme.ParentLoad:
                if (lazyLoad)
                {
                    return(element + " is ParentLoad; can't use LazyLoad.");
                }
                break;
            }
            return(string.Empty);
        }
コード例 #2
0
            public EntityFacade(CslaGeneratorUnit parent, ObjectRelationType relationType, string objectName,
                                string propertyName, string collectionTypeName, string itemTypeName, LoadingScheme loadingScheme,
                                CriteriaPropertyCollection loadProperties, ParameterCollection loadParameters, bool lazyLoad)
                : base(parent)
            {
                RelationType       = relationType;
                ObjectName         = objectName;
                PropertyName       = propertyName;
                CollectionTypeName = collectionTypeName;
                ItemTypeName       = itemTypeName;
                LazyLoad           = lazyLoad;
                LoadingScheme      = loadingScheme;
                LoadProperties     = CriteriaPropertyCollection.Clone(loadProperties);
                LoadParameters     = loadParameters;

                if (parent != null && parent.Params != null)
                {
                    Parent = parent;
                }
            }