다음을 통해 공유


DbExpressionBuilder.TreatAs(DbExpression, TypeUsage) 메서드

정의

DbTreatExpression를 만듭니다.

public static System.Data.Entity.Core.Common.CommandTrees.DbTreatExpression TreatAs (this System.Data.Entity.Core.Common.CommandTrees.DbExpression argument, System.Data.Entity.Core.Metadata.Edm.TypeUsage treatType);
static member TreatAs : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.TypeUsage -> System.Data.Entity.Core.Common.CommandTrees.DbTreatExpression
<Extension()>
Public Function TreatAs (argument As DbExpression, treatType As TypeUsage) As DbTreatExpression

매개 변수

argument
DbExpression

인스턴스를 지정하는 식입니다.

treatType
TypeUsage

treat-as 형식의 형식 메타데이터입니다.

반환

지정된 인수 및 형식을 사용하는 새 DbTreatExpression입니다.

예외

argument 또는 treatType이 null입니다.

treatType이 인수의 결과 형식과 동일한 형식 계층 구조에 있지 않습니다.

적용 대상