Esempio n. 1
0
        private static ModelQueryBuildConfig GenerateModelQueryBuildConfig(Type modelType)
        {
            var config = new ModelQueryBuildConfig()
            {
                ModelType   = modelType,
                SelectQuery = BuildEmptyQuery(modelType)
            };

            ExpressionApplier.AddAllColumns(config);
            return(config);
        }
Esempio n. 2
0
        private static bool ApplyExpressionChainItemOnSelectQuery(ExpressionMetadataChainItem expressionChainItem, ModelQueryBuildConfig selectQuery)
        {
            var expressionApplier = ExpressionApplier.GetApplier(expressionChainItem.Expression.Method.Name);

            expressionChainItem.IsAppliedToQuery = expressionApplier?.Apply(expressionChainItem, selectQuery) ?? false;
            return(expressionChainItem.IsAppliedToQuery);
        }