DbExpressionBuilder.Case Metodo

Definizione

Crea un nuovo DbCaseExpressionoggetto .

public:
 static System::Data::Common::CommandTrees::DbCaseExpression ^ Case(System::Collections::Generic::IEnumerable<System::Data::Common::CommandTrees::DbExpression ^> ^ whenExpressions, System::Collections::Generic::IEnumerable<System::Data::Common::CommandTrees::DbExpression ^> ^ thenExpressions, System::Data::Common::CommandTrees::DbExpression ^ elseExpression);
public static System.Data.Common.CommandTrees.DbCaseExpression Case(System.Collections.Generic.IEnumerable<System.Data.Common.CommandTrees.DbExpression> whenExpressions, System.Collections.Generic.IEnumerable<System.Data.Common.CommandTrees.DbExpression> thenExpressions, System.Data.Common.CommandTrees.DbExpression elseExpression);
static member Case : seq<System.Data.Common.CommandTrees.DbExpression> * seq<System.Data.Common.CommandTrees.DbExpression> * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbCaseExpression
Public Function Case (whenExpressions As IEnumerable(Of DbExpression), thenExpressions As IEnumerable(Of DbExpression), elseExpression As DbExpression) As DbCaseExpression

Parametri

whenExpressions
IEnumerable<DbExpression>

Elenco di espressioni che forniscono l'condizionale per ogni caso.

thenExpressions
IEnumerable<DbExpression>

Elenco di espressioni che forniscono il risultato di ogni case.

elseExpression
DbExpression

Espressione che definisce il risultato quando non viene trovata alcuna corrispondenza tra maiuscole e minuscole.

Valori restituiti

Nuovo DbCaseExpression con i case specificati e il risultato predefinito.

Eccezioni

whenExpressions oppure thenExpressions è null o contiene null oppure elseExpression è null.

whenExpressions oppure thenExpressions è vuoto o whenExpressions contiene un'espressione con un tipo di risultato non booleano oppure non esiste alcun tipo di risultato comune per tutte le espressioni in thenExpressions e elseExpression.

Si applica a