当前位置: 首页>>代码示例>>C#>>正文


C# EntityQueryModelVisitor类代码示例

本文整理汇总了C#中EntityQueryModelVisitor的典型用法代码示例。如果您正苦于以下问题:C# EntityQueryModelVisitor类的具体用法?C# EntityQueryModelVisitor怎么用?C# EntityQueryModelVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EntityQueryModelVisitor类属于命名空间,在下文中一共展示了EntityQueryModelVisitor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Create

 public override EntityQueryModelVisitor Create(
     QueryCompilationContext queryCompilationContext,
     EntityQueryModelVisitor parentEntityQueryModelVisitor)
     => new RelationalQueryModelVisitor(
         Model,
         QueryOptimizer,
         NavigationRewritingExpressionVisitorFactory,
         SubQueryMemberPushDownExpressionVisitor,
         QuerySourceTracingExpressionVisitorFactory,
         EntityResultFindingExpressionVisitorFactory,
         TaskBlockingExpressionVisitor,
         MemberAccessBindingExpressionVisitorFactory,
         OrderingExpressionVisitorFactory,
         ProjectionExpressionVisitorFactory,
         EntityQueryableExpressionVisitorFactory,
         QueryAnnotationExtractor,
         ResultOperatorHandler,
         EntityMaterializerSource,
         ExpressionPrinter,
         RelationalAnnotationProvider,
         IncludeExpressionVisitorFactory,
         SqlTranslatingExpressionVisitorFactory,
         CompositePredicateExpressionVisitorFactory,
         QueryFlatteningExpressionVisitorFactory,
         ShapedQueryFindingExpressionVisitorFactory,
         ContextOptions,
         (RelationalQueryCompilationContext)Check.NotNull(queryCompilationContext, nameof(queryCompilationContext)),
         (RelationalQueryModelVisitor)parentEntityQueryModelVisitor);
开发者ID:491134648,项目名称:EntityFramework,代码行数:28,代码来源:RelationalQueryModelVisitorFactory.cs

示例2: Create

 public virtual ExpressionVisitor Create(
     EntityQueryModelVisitor queryModelVisitor, IQuerySource querySource)
     => new RelationalProjectionExpressionVisitor(
         _sqlTranslatingExpressionVisitorFactory,
         _entityMaterializerSource,
         (RelationalQueryModelVisitor)Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)),
         Check.NotNull(querySource, nameof(querySource)));
开发者ID:adwardliu,项目名称:EntityFramework,代码行数:7,代码来源:RelationalProjectionExpressionVisitorFactory.cs

示例3: RequiresMaterializationExpressionVisitor

 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used 
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public RequiresMaterializationExpressionVisitor(
     [NotNull] IModel model,
     [NotNull] EntityQueryModelVisitor queryModelVisitor)
 {
     _model = model;
     _queryModelVisitor = queryModelVisitor;
 }
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:11,代码来源:RequiresMaterializationExpressionVisitor.cs

示例4: Create

 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public virtual ExpressionVisitor Create(
     EntityQueryModelVisitor queryModelVisitor, IQuerySource querySource)
     => new InMemoryEntityQueryableExpressionVisitor(
         _model,
         _materializerFactory,
         Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)),
         querySource);
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:11,代码来源:InMemoryEntityQueryableExpressionVisitorFactory.cs

示例5: CreateQueryModelVisitor

        public override EntityQueryModelVisitor CreateQueryModelVisitor(EntityQueryModelVisitor parentEntityQueryModelVisitor)
        {
            var relationalQueryModelVisitor
                = (RelationalQueryModelVisitor)base.CreateQueryModelVisitor(parentEntityQueryModelVisitor);

            _relationalQueryModelVisitors.Add(relationalQueryModelVisitor);

            return relationalQueryModelVisitor;
        }
开发者ID:491134648,项目名称:EntityFramework,代码行数:9,代码来源:RelationalQueryCompilationContext.cs

示例6: Create

 /// <summary>
 ///     Creates a new ExpressionVisitor.
 /// </summary>
 /// <param name="queryModelVisitor"> The query model visitor. </param>
 /// <param name="querySource"> The query source. </param>
 /// <returns>
 ///     An ExpressionVisitor.
 /// </returns>
 public virtual ExpressionVisitor Create(
     EntityQueryModelVisitor queryModelVisitor, IQuerySource querySource)
     => new RelationalEntityQueryableExpressionVisitor(
         _model,
         _selectExpressionFactory,
         _materializerFactory,
         _shaperCommandContextFactory,
         _relationalAnnotationProvider,
         (RelationalQueryModelVisitor)Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)),
         querySource);
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:18,代码来源:RelationalEntityQueryableExpressionVisitorFactory.cs

示例7: Create

 public override ExpressionVisitor Create(EntityQueryModelVisitor queryModelVisitor, IQuerySource querySource)
 {
     return new MaterializingRelationalEntityQueryableExpressionVisitor(
         _model,
         _selectExpressionFactory,
         _materializerFactory,
         _shaperCommandContextFactory,
         _relationalAnnotationProvider,
         (RelationalQueryModelVisitor)queryModelVisitor,
         querySource); ;
 }
开发者ID:nefremov,项目名称:LazyEntityFramework,代码行数:11,代码来源:MaterializingRelationalEntityQueryableExpressionVisitorFactory.cs

示例8: CreateQueryModelVisitor

        public override EntityQueryModelVisitor CreateQueryModelVisitor(
            EntityQueryModelVisitor parentEntityQueryModelVisitor)
        {
            var relationalQueryModelVisitor
                = new RelationalQueryModelVisitor(
                    this, (RelationalQueryModelVisitor)parentEntityQueryModelVisitor);

            _relationalQueryModelVisitors.Add(relationalQueryModelVisitor);

            return relationalQueryModelVisitor;
        }
开发者ID:thegido,项目名称:EntityFramework,代码行数:11,代码来源:RelationalQueryCompilationContext.cs

示例9: Create

 public override EntityQueryModelVisitor Create(QueryCompilationContext queryCompilationContext,
     EntityQueryModelVisitor parentEntityQueryModelVisitor)
     => new MyEntityQueryModelVisitor(QueryOptimizer,
         NavigationRewritingExpressionVisitorFactory,
         SubQueryMemberPushDownExpressionVisitor,
         QuerySourceTracingExpressionVisitorFactory,
         EntityResultFindingExpressionVisitorFactory,
         TaskBlockingExpressionVisitor,
         MemberAccessBindingExpressionVisitorFactory,
         OrderingExpressionVisitorFactory,
         ProjectionExpressionVisitorFactory,
         EntityQueryableExpressionVisitorFactory,
         QueryAnnotationExtractor,
         ResultOperatorHandler,
         EntityMaterializerSource,
         ExpressionPrinter,
         queryCompilationContext);
开发者ID:CrazyHorse007,项目名称:EntityFramework.Docs,代码行数:17,代码来源:MyEntityQueryModelVisitorFactory.cs

示例10: HandleResultOperator

        public virtual Expression HandleResultOperator(
            EntityQueryModelVisitor entityQueryModelVisitor,
            ResultOperatorBase resultOperator,
            QueryModel queryModel)
        {
            Check.NotNull(entityQueryModelVisitor, nameof(entityQueryModelVisitor));
            Check.NotNull(resultOperator, nameof(resultOperator));
            Check.NotNull(queryModel, nameof(queryModel));

            ResultHandler handler;
            if (!_handlers.TryGetValue(resultOperator.GetType(), out handler))
            {
                throw new NotImplementedException(resultOperator.GetType().ToString());
            }

            return handler(entityQueryModelVisitor, resultOperator, queryModel);
        }
开发者ID:aishaloshik,项目名称:EntityFramework,代码行数:17,代码来源:ResultOperatorHandler.cs

示例11: HandleAll

        private static Expression HandleAll(
            EntityQueryModelVisitor entityQueryModelVisitor,
            AllResultOperator allResultOperator,
            QueryModel queryModel)
        {
            var sequenceType
                = entityQueryModelVisitor.Expression.Type.GetSequenceType();

            var predicate
                = entityQueryModelVisitor
                    .ReplaceClauseReferences(
                        allResultOperator.Predicate,
                        queryModel.MainFromClause);

            return CallWithPossibleCancellationToken(
                entityQueryModelVisitor.LinqOperatorProvider.All
                    .MakeGenericMethod(sequenceType),
                entityQueryModelVisitor.Expression,
                Expression.Lambda(predicate, entityQueryModelVisitor.CurrentParameter));
        }
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:20,代码来源:ResultOperatorHandler.cs

示例12: HandleAll

        private static Expression HandleAll(
            EntityQueryModelVisitor entityQueryModelVisitor,
            AllResultOperator allResultOperator,
            QueryModel queryModel)
        {
            var predicate
                = entityQueryModelVisitor
                    .ReplaceClauseReferences(
                        allResultOperator.Predicate,
                        queryModel.MainFromClause);

            return CallWithPossibleCancellationToken(
                entityQueryModelVisitor.LinqOperatorProvider.All
                    .MakeGenericMethod(typeof(QuerySourceScope)),
                entityQueryModelVisitor.CreateScope(
                    entityQueryModelVisitor.Expression,
                    entityQueryModelVisitor.StreamedSequenceInfo.ResultItemType,
                    queryModel.MainFromClause),
                Expression.Lambda(predicate, EntityQueryModelVisitor.QuerySourceScopeParameter));
        }
开发者ID:aishaloshik,项目名称:EntityFramework,代码行数:20,代码来源:ResultOperatorHandler.cs

示例13: HandleDefaultIfEmpty

        private static Expression HandleDefaultIfEmpty(
            EntityQueryModelVisitor entityQueryModelVisitor,
            DefaultIfEmptyResultOperator defaultIfEmptyResultOperator,
            QueryModel queryModel)
        {
            if (defaultIfEmptyResultOperator.OptionalDefaultValue == null)
            {
                return Expression.Call(
                    entityQueryModelVisitor.LinqOperatorProvider.DefaultIfEmpty
                        .MakeGenericMethod(entityQueryModelVisitor.StreamedSequenceInfo.ResultItemType),
                    entityQueryModelVisitor.Expression);
            }

            var optionalDefaultValue
                = entityQueryModelVisitor
                    .ReplaceClauseReferences(
                        defaultIfEmptyResultOperator.OptionalDefaultValue,
                        queryModel.MainFromClause);

            return Expression.Call(
                entityQueryModelVisitor.LinqOperatorProvider.DefaultIfEmptyArg
                    .MakeGenericMethod(entityQueryModelVisitor.StreamedSequenceInfo.ResultItemType),
                entityQueryModelVisitor.Expression,
                optionalDefaultValue);
        }
开发者ID:aishaloshik,项目名称:EntityFramework,代码行数:25,代码来源:ResultOperatorHandler.cs

示例14: HandleDistinct

 private static Expression HandleDistinct(EntityQueryModelVisitor entityQueryModelVisitor)
     => Expression.Call(
         entityQueryModelVisitor.LinqOperatorProvider.Distinct
             .MakeGenericMethod(entityQueryModelVisitor.StreamedSequenceInfo.ResultItemType),
         entityQueryModelVisitor.Expression);
开发者ID:aishaloshik,项目名称:EntityFramework,代码行数:5,代码来源:ResultOperatorHandler.cs

示例15: HandleGroup

        private static Expression HandleGroup(
            EntityQueryModelVisitor entityQueryModelVisitor,
            GroupResultOperator groupResultOperator,
            QueryModel queryModel)
        {
            var keySelector
                = entityQueryModelVisitor
                    .ReplaceClauseReferences(
                        groupResultOperator.KeySelector,
                        queryModel.MainFromClause);

            var elementSelector
                = entityQueryModelVisitor
                    .ReplaceClauseReferences(
                        groupResultOperator.ElementSelector,
                        queryModel.MainFromClause);

            return Expression.Call(
                entityQueryModelVisitor.LinqOperatorProvider.GroupBy
                    .MakeGenericMethod(
                        typeof(QuerySourceScope),
                        groupResultOperator.KeySelector.Type,
                        groupResultOperator.ElementSelector.Type),
                entityQueryModelVisitor.CreateScope(
                    entityQueryModelVisitor.Expression,
                    entityQueryModelVisitor.StreamedSequenceInfo.ResultItemType,
                    queryModel.MainFromClause),
                Expression.Lambda(keySelector, EntityQueryModelVisitor.QuerySourceScopeParameter),
                Expression.Lambda(elementSelector, EntityQueryModelVisitor.QuerySourceScopeParameter));
        }
开发者ID:aishaloshik,项目名称:EntityFramework,代码行数:30,代码来源:ResultOperatorHandler.cs


注:本文中的EntityQueryModelVisitor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。