Class FromSqlExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query.SqlExpressions
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression that represents a subquery table source with user-provided custom SQL.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class FromSqlExpression : TableExpressionBase, IPrintableExpression
- Inheritance
-
FromSqlExpression
- Implements
-
IPrintableExpression
- Inherited Members
Constructors
FromSqlExpression(string, Expression, string)
Creates a new instance of the FromSqlExpression class.
[Obsolete("Use the constructor which takes alias as first argument.")]
public FromSqlExpression(string sql, Expression arguments, string alias)
Parameters
sql
stringA user-provided custom SQL for the table source.
arguments
ExpressionA user-provided parameters to pass to the custom SQL.
alias
stringA string alias for the table source.
FromSqlExpression(string, string, Expression)
Creates a new instance of the FromSqlExpression class.
public FromSqlExpression(string alias, string sql, Expression arguments)
Parameters
alias
stringA string alias for the table source.
sql
stringA user-provided custom SQL for the table source.
arguments
ExpressionA user-provided parameters to pass to the custom SQL.
Properties
Arguments
The user-provided parameters passed to the custom SQL.
public virtual Expression Arguments { get; }
Property Value
Sql
The user-provided custom SQL for the table source.
public virtual string Sql { 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(Expression)
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 FromSqlExpression Update(Expression arguments)
Parameters
arguments
ExpressionThe Arguments property of the result.
Returns
- FromSqlExpression
This expression if no children changed, or an expression with the updated children.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitor
ExpressionVisitor