다음을 통해 공유


DbExpressionBuilder.Case 메서드

정의

DbCaseExpression를 만듭니다.

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

매개 변수

whenExpressions
IEnumerable<DbExpression>

각 case의 조건을 제공하는 식의 목록입니다.

thenExpressions
IEnumerable<DbExpression>

각 case의 결과를 제공하는 식의 목록입니다.

elseExpression
DbExpression

case가 일치하지 않는 경우 결과를 정의하는 식입니다.

반환

지정된 사례 및 기본 결과를 사용하는 새 DbCaseExpression입니다.

예외

Expressions 또는 thenExpressions가 null이거나 null을 포함하거나 elseExpression이 null인 경우

Expressions 또는 thenExpressions가 비어 있거나Expressions에 부울이 아닌 결과 형식이 있는 식이 포함되어 있거나 thenExpressions 및 elseExpression의 모든 식에 대한 일반적인 결과 형식이 없을 때 입니다.

적용 대상