DbExpressionBuilder.Case Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Vytvoří novou DbCaseExpression.
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
Parametry
- whenExpressions
- IEnumerable<DbExpression>
Seznamvýrazch
- thenExpressions
- IEnumerable<DbExpression>
Seznam výrazů, které poskytují výsledek každého případu.
- elseExpression
- DbExpression
Výraz, který definuje výsledek v případě, že se neshoduje žádná velká a malá písmena.
Návraty
Nový DbCaseExpression se zadanými případy a výchozím výsledkem.
Výjimky
whenExpressions nebo thenExpressions je null nebo obsahuje hodnotu null nebo elseExpression má hodnotu null.
whenExpressions nebo thenExpressions je prázdný nebo whenExpressions obsahuje výraz s jiným než logickým typem výsledku nebo neexistuje žádný společný typ výsledku pro všechny výrazy v thenExpressions a elseExpression.