Table of Contents

Class TableExpressionBase

Namespace
Microsoft.EntityFrameworkCore.Query.SqlExpressions
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

An expression that represents a table source in a SQL tree.

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

public abstract class TableExpressionBase : Expression, IPrintableExpression
Inheritance
TableExpressionBase
Implements
IPrintableExpression
Derived
Inherited Members

Constructors

TableExpressionBase(string?)

Creates a new instance of the TableExpressionBase class.

protected TableExpressionBase(string? alias)

Parameters

alias string

A string alias for the table source.

TableExpressionBase(string?, IEnumerable<IAnnotation>?)

Creates a new instance of the TableExpressionBase class.

protected TableExpressionBase(string? alias, IEnumerable<IAnnotation>? annotations)

Parameters

alias string

A string alias for the table source.

annotations IEnumerable<IAnnotation>

A collection of annotations associated with this expression.

Properties

Alias

The alias assigned to this table source.

public virtual string? Alias { get; }

Property Value

string

NodeType

public override sealed ExpressionType NodeType { get; }

Property Value

ExpressionType

Type

public override Type Type { get; }

Property Value

Type

Methods

AddAnnotation(string, object?)

Adds an annotation to this object. Throws if an annotation with the specified name already exists.

public virtual TableExpressionBase AddAnnotation(string name, object? value)

Parameters

name string

The key of the annotation to be added.

value object

The value to be stored in the annotation.

Returns

TableExpressionBase

The new expression with annotation applied to it.

CreateWithAnnotations(IEnumerable<IAnnotation>)

Creates an object like this with specified annotations.

protected abstract TableExpressionBase CreateWithAnnotations(IEnumerable<IAnnotation> annotations)

Parameters

annotations IEnumerable<IAnnotation>

The annotations to be applied.

Returns

TableExpressionBase

The new expression with given annotations.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

FindAnnotation(string)

Gets the annotation with the given name, returning null if it does not exist.

public virtual IAnnotation? FindAnnotation(string name)

Parameters

name string

The key of the annotation to find.

Returns

IAnnotation

The existing annotation if an annotation with the specified name already exists. Otherwise, null.

GetAnnotations()

Gets all annotations on the current object.

public virtual IEnumerable<IAnnotation> GetAnnotations()

Returns

IEnumerable<IAnnotation>

GetHashCode()

public override int GetHashCode()

Returns

int

Print(ExpressionPrinter)

Creates a printable string representation of the given expression using Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.

protected abstract void Print(ExpressionPrinter expressionPrinter)

Parameters

expressionPrinter ExpressionPrinter

The expression printer to use.

PrintAnnotations(ExpressionPrinter)

Creates a printable string representation of annotations associated with the given expression using Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.

protected virtual void PrintAnnotations(ExpressionPrinter expressionPrinter)

Parameters

expressionPrinter ExpressionPrinter

The expression printer to use.

VisitChildren(ExpressionVisitor)

protected override Expression VisitChildren(ExpressionVisitor visitor)

Parameters

visitor ExpressionVisitor

Returns

Expression