DbExpressionBuilder.Case Yöntem

Tanım

Yeni DbCaseExpressionbir oluşturur.

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

Parametreler

whenExpressions
IEnumerable<DbExpression>

Her durumun koşulunu sağlayan ifadelerin listesi.

thenExpressions
IEnumerable<DbExpression>

Her servis talebinin sonucunu sağlayan ifadelerin listesi.

elseExpression
DbExpression

Hiçbir büyük/küçük harf eşleşmediğinde sonucu tanımlayan ifade.

Döndürülenler

Belirtilen servis taleplerini ve varsayılan sonucu içeren yeni bir DbCaseExpression.

Özel durumlar

whenExpressions veya thenExpressions null veya null içeriyor ya da elseExpression null.

whenExpressionsveya thenExpressions boş ya da whenExpressions Boole olmayan sonuç türüne sahip bir ifade içeriyor veya ve thenExpressionsiçindeki elseExpression tüm ifadeler için ortak sonuç türü yok.

Şunlara uygulanır