Class DistinctExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query.SqlExpressions
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression that represents a DISTINCT in a SQL tree.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class DistinctExpression : SqlExpression, IPrintableExpression
- Inheritance
-
DistinctExpression
- Implements
-
IPrintableExpression
- Inherited Members
Constructors
DistinctExpression(SqlExpression)
Creates a new instance of the DistinctExpression class.
public DistinctExpression(SqlExpression operand)
Parameters
operand
SqlExpressionAn expression on which DISTINCT is applied.
Properties
Operand
The expression on which DISTINCT is applied.
public virtual SqlExpression Operand { get; }
Property Value
Methods
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Print(ExpressionPrinter)
protected override void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinter
ExpressionPrinter
Update(SqlExpression)
Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.
public virtual DistinctExpression Update(SqlExpression operand)
Parameters
operand
SqlExpressionThe Operand property of the result.
Returns
- DistinctExpression
This expression if no children changed, or an expression with the updated children.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitor
ExpressionVisitor