Compartilhar via


SqlExpressionFactory.Case Método

Definição

Sobrecargas

Case(SqlExpression, CaseWhenClause[])
Obsoleto.

Cria um novo CaseExpression que representa uma instrução CASE em uma árvore SQL.

Case(IReadOnlyList<CaseWhenClause>, SqlExpression)

Cria um novo CaseExpression que representa uma instrução CASE em uma árvore SQL.

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

Cria um novo CaseExpression que representa uma instrução CASE em uma árvore SQL.

Case(SqlExpression, CaseWhenClause[])

Cuidado

Use overload which takes IReadOnlyList instead of params

Cria um novo CaseExpression que representa uma instrução CASE em uma árvore 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

Uma expressão com a qual comparar Test em whenClauses.

whenClauses
CaseWhenClause[]

Uma lista de para CaseWhenClause comparar e obter o resultado.

Retornos

Uma expressão que representa uma instrução CASE em uma árvore SQL.

Implementações

Atributos

Aplica-se a

Case(IReadOnlyList<CaseWhenClause>, SqlExpression)

Cria um novo CaseExpression que representa uma instrução CASE em uma árvore 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>

Uma lista de para CaseWhenClause avaliar a condição e obter o resultado.

elseResult
SqlExpression

Um valor a ser retornado se não houver whenClauses correspondência, se houver.

Retornos

Uma expressão que representa uma instrução CASE em uma árvore SQL.

Implementações

Aplica-se 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[]

Retornos

Aplica-se a

Case(SqlExpression, IReadOnlyList<CaseWhenClause>, SqlExpression)

Cria um novo CaseExpression que representa uma instrução CASE em uma árvore 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

Uma expressão com a qual comparar Test em whenClauses.

whenClauses
IReadOnlyList<CaseWhenClause>

Uma lista de para CaseWhenClause comparar e obter o resultado.

elseResult
SqlExpression

Um valor a ser retornado se não houver whenClauses correspondência, se houver.

Retornos

Uma expressão que representa uma instrução CASE em uma árvore SQL.

Implementações

Aplica-se a