本文整理汇总了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);
示例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)));
示例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;
}
示例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);
示例5: CreateQueryModelVisitor
public override EntityQueryModelVisitor CreateQueryModelVisitor(EntityQueryModelVisitor parentEntityQueryModelVisitor)
{
var relationalQueryModelVisitor
= (RelationalQueryModelVisitor)base.CreateQueryModelVisitor(parentEntityQueryModelVisitor);
_relationalQueryModelVisitors.Add(relationalQueryModelVisitor);
return relationalQueryModelVisitor;
}
示例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;
}
示例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);
示例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);
}
示例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));
}
示例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));
}
示例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);
}
示例14: HandleDistinct
private static Expression HandleDistinct(EntityQueryModelVisitor entityQueryModelVisitor)
=> Expression.Call(
entityQueryModelVisitor.LinqOperatorProvider.Distinct
.MakeGenericMethod(entityQueryModelVisitor.StreamedSequenceInfo.ResultItemType),
entityQueryModelVisitor.Expression);
示例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));
}