Compartir a través de


SqlExpressionFactory.Case Método

Definición

Sobrecargas

Case(SqlExpression, CaseWhenClause[])
Obsoletos.

Crea un nuevo CaseExpression objeto que representa una instrucción CASE en un árbol SQL.

Case(IReadOnlyList<CaseWhenClause>, SqlExpression)

Crea un nuevo CaseExpression objeto que representa una instrucción CASE en un árbol SQL.

Case(SqlExpression, SqlExpression, CaseWhenClause[])
Case(SqlExpression, IReadOnlyList<CaseWhenClause>, SqlExpression)

Crea un nuevo CaseExpression objeto que representa una instrucción CASE en un árbol SQL.

Case(SqlExpression, CaseWhenClause[])

Precaución

Use overload which takes IReadOnlyList instead of params

Crea un nuevo CaseExpression objeto que representa una instrucción CASE en un árbol SQL.

public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression Case (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, params Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] whenClauses);
[System.Obsolete("Use overload which takes IReadOnlyList instead of params")]
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression Case (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, params Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] whenClauses);
abstract member Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
override this.Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
[<System.Obsolete("Use overload which takes IReadOnlyList instead of params")>]
abstract member Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
override this.Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
Public Overridable Function Case (operand As SqlExpression, ParamArray whenClauses As CaseWhenClause()) As CaseExpression

Parámetros

operand
SqlExpression

Expresión con la que se va a comparar Test en whenClauses.

whenClauses
CaseWhenClause[]

Lista de CaseWhenClause que se va a comparar y obtener el resultado.

Devoluciones

Expresión que representa una instrucción CASE en un árbol SQL.

Implementaciones

Atributos

Se aplica a

Case(IReadOnlyList<CaseWhenClause>, SqlExpression)

Crea un nuevo CaseExpression objeto que representa una instrucción CASE en un árbol SQL.

public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression Case (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> whenClauses, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression elseResult);
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression Case (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> whenClauses, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? elseResult);
abstract member Case : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> * Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
override this.Case : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> * Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
Public Overridable Function Case (whenClauses As IReadOnlyList(Of CaseWhenClause), elseResult As SqlExpression) As CaseExpression

Parámetros

whenClauses
IReadOnlyList<CaseWhenClause>

Lista de para CaseWhenClause evaluar la condición y obtener el resultado.

elseResult
SqlExpression

Valor que se va a devolver si no whenClauses hay ninguna coincidencia, si existe.

Devoluciones

Expresión que representa una instrucción CASE en un árbol SQL.

Implementaciones

Se aplica a

Case(SqlExpression, SqlExpression, CaseWhenClause[])

public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression Case (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression elseResult, params Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] whenClauses);
abstract member Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
override this.Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause[] -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
Public Overridable Function Case (operand As SqlExpression, elseResult As SqlExpression, ParamArray whenClauses As CaseWhenClause()) As CaseExpression

Parámetros

operand
SqlExpression
elseResult
SqlExpression
whenClauses
CaseWhenClause[]

Devoluciones

Se aplica a

Case(SqlExpression, IReadOnlyList<CaseWhenClause>, SqlExpression)

Crea un nuevo CaseExpression objeto que representa una instrucción CASE en un árbol SQL.

public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression Case (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> whenClauses, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression elseResult);
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression Case (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? operand, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> whenClauses, Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? elseResult);
abstract member Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> * Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
override this.Case : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseWhenClause> * Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.CaseExpression
Public Overridable Function Case (operand As SqlExpression, whenClauses As IReadOnlyList(Of CaseWhenClause), elseResult As SqlExpression) As CaseExpression

Parámetros

operand
SqlExpression

Expresión con la que se va a comparar Test en whenClauses.

whenClauses
IReadOnlyList<CaseWhenClause>

Lista de CaseWhenClause que se va a comparar y obtener el resultado.

elseResult
SqlExpression

Valor que se va a devolver si no whenClauses hay ninguna coincidencia, si existe.

Devoluciones

Expresión que representa una instrucción CASE en un árbol SQL.

Implementaciones

Se aplica a