Compartilhar via


QueryableMethodTranslatingExpressionVisitor Class

Definition

A class that translates queryable methods in a query.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public abstract class QueryableMethodTranslatingExpressionVisitor : System.Linq.Expressions.ExpressionVisitor
type QueryableMethodTranslatingExpressionVisitor = class
    inherit ExpressionVisitor
Public MustInherit Class QueryableMethodTranslatingExpressionVisitor
Inherits ExpressionVisitor
Inheritance
QueryableMethodTranslatingExpressionVisitor
Derived

Remarks

See Implementation of database providers and extensions and How EF Core queries work for more information and examples.

Constructors

QueryableMethodTranslatingExpressionVisitor(QueryableMethodTranslatingExpressionVisitorDependencies, Boolean)
QueryableMethodTranslatingExpressionVisitor(QueryableMethodTranslatingExpressionVisitorDependencies, QueryCompilationContext, Boolean)

Creates a new instance of the QueryableMethodTranslatingExpressionVisitor class.

Properties

Dependencies

Dependencies for this service.

QueryCompilationContext

The query compilation context object for current compilation.

TranslationErrorDetails

Detailed information about errors encountered during translation.

Methods

AddTranslationErrorDetails(String)

Adds detailed information about errors encountered during translation.

CreateShapedQueryExpression(IEntityType)

Creates a ShapedQueryExpression for the given entity type.

CreateShapedQueryExpression(Type)
Obsolete.

Creates a ShapedQueryExpression for the given type by finding its entity type in the model.

CreateSubqueryVisitor()

Creates a visitor customized to translate a subquery through TranslateSubquery(Expression).

MarkShaperNullable(Expression)

Marks the entity shaper in the given shaper expression as nullable.

Translate(Expression)

Translates an expression to an equivalent SQL representation.

TranslateAll(ShapedQueryExpression, LambdaExpression)

Translates All<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

TranslateAny(ShapedQueryExpression, LambdaExpression)

Translates Any<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateAverage(ShapedQueryExpression, LambdaExpression, Type)

Translates Average(IQueryable<Decimal>) method and other overloads over the given source.

TranslateCast(ShapedQueryExpression, Type)

Translates Cast<TResult>(IQueryable) method over the given source.

TranslateConcat(ShapedQueryExpression, ShapedQueryExpression)

Translates Concat<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateContains(ShapedQueryExpression, Expression)

Translates Contains<TSource>(IQueryable<TSource>, TSource) method over the given source.

TranslateCount(ShapedQueryExpression, LambdaExpression)

Translates Count<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateDefaultIfEmpty(ShapedQueryExpression, Expression)

Translates DefaultIfEmpty<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateDistinct(ShapedQueryExpression)

Translates Distinct<TSource>(IQueryable<TSource>) method over the given source.

TranslateElementAtOrDefault(ShapedQueryExpression, Expression, Boolean)

Translates ElementAt<TSource>(IQueryable<TSource>, Int32) method or ElementAtOrDefault<TSource>(IQueryable<TSource>, Int32) over the given source.

TranslateExcept(ShapedQueryExpression, ShapedQueryExpression)

Translates Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateExecuteDelete(ShapedQueryExpression)

Translates ExecuteDelete<TSource>(IQueryable<TSource>) method over the given source.

TranslateExecuteUpdate(ShapedQueryExpression, LambdaExpression)

Translates ExecuteUpdate<TSource>(IQueryable<TSource>, Expression<Func<SetPropertyCalls<TSource>,SetPropertyCalls<TSource>>>) method over the given source.

TranslateFirstOrDefault(ShapedQueryExpression, LambdaExpression, Type, Boolean)

Translates First<TSource>(IQueryable<TSource>) method or FirstOrDefault<TSource>(IQueryable<TSource>) and their other overloads over the given source.

TranslateGroupBy(ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) method and other overloads over the given source.

TranslateGroupJoin(ShapedQueryExpression, ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>) method over the given source.

TranslateInlineQueryRoot(InlineQueryRootExpression)

Translates an InlineQueryRootExpression, which represents a queryable collection expressed inline within the query.

TranslateIntersect(ShapedQueryExpression, ShapedQueryExpression)

Translates Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateJoin(ShapedQueryExpression, ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>) method over the given source.

TranslateLastOrDefault(ShapedQueryExpression, LambdaExpression, Type, Boolean)

Translates Last<TSource>(IQueryable<TSource>) method or LastOrDefault<TSource>(IQueryable<TSource>) and their other overloads over the given source.

TranslateLeftJoin(ShapedQueryExpression, ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates LeftJoin over the given source.

TranslateLongCount(ShapedQueryExpression, LambdaExpression)

Translates LongCount<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateMax(ShapedQueryExpression, LambdaExpression, Type)

Translates Max<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateMemberAccess(Expression, MemberIdentity)

Translates a member access. Used when a property on an entity type represents a collection on which queryable LINQ operators may be composed.

TranslateMin(ShapedQueryExpression, LambdaExpression, Type)

Translates Min<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateOfType(ShapedQueryExpression, Type)

Translates OfType<TResult>(IQueryable) method over the given source.

TranslateOrderBy(ShapedQueryExpression, LambdaExpression, Boolean)

Translates OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) or OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) method over the given source.

TranslateParameterQueryRoot(ParameterQueryRootExpression)

Translates a ParameterQueryRootExpression, which represents a queryable collection referenced as a parameter within the query.

TranslateResultSelectorForJoin(ShapedQueryExpression, LambdaExpression, Expression, Type)
Obsolete.

Translates the result selector for join operation.

TranslateReverse(ShapedQueryExpression)

Translates Reverse<TSource>(IQueryable<TSource>) method over the given source.

TranslateSelect(ShapedQueryExpression, LambdaExpression)

Translates Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) method over the given source.

TranslateSelectMany(ShapedQueryExpression, LambdaExpression, LambdaExpression)

Translates SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource, IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection, TResult>>) method over the given source.

TranslateSelectMany(ShapedQueryExpression, LambdaExpression)

Translates SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TResult>>>) method over the given source.

TranslateSingleOrDefault(ShapedQueryExpression, LambdaExpression, Type, Boolean)

Translates Single<TSource>(IQueryable<TSource>) method or SingleOrDefault<TSource>(IQueryable<TSource>) and their other overloads over the given source.

TranslateSkip(ShapedQueryExpression, Expression)

Translates Skip<TSource>(IQueryable<TSource>, Int32) method over the given source.

TranslateSkipWhile(ShapedQueryExpression, LambdaExpression)

Translates SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

TranslateSubquery(Expression)

Translates the given subquery.

TranslateSum(ShapedQueryExpression, LambdaExpression, Type)

Translates Sum(IQueryable<Decimal>) method and other overloads over the given source.

TranslateTake(ShapedQueryExpression, Expression)

Translates Take<TSource>(IQueryable<TSource>, Int32) method over the given source.

TranslateTakeWhile(ShapedQueryExpression, LambdaExpression)

Translates TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

TranslateThenBy(ShapedQueryExpression, LambdaExpression, Boolean)

Translates ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) or ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) method over the given source.

TranslateUnion(ShapedQueryExpression, ShapedQueryExpression)

Translates Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateWhere(ShapedQueryExpression, LambdaExpression)

Translates Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

VisitConstant(ConstantExpression)
VisitExtension(Expression)

Visits the children of the extension expression.

VisitMethodCall(MethodCallExpression)

Visits the children of the MethodCallExpression.

Applies to