다음을 통해 공유


DbExpressionBuilder.CastTo(DbExpression, TypeUsage) 메서드

정의

다형 인수에 캐스트 작업을 적용하는 새 DbCastExpression을 만듭니다.

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

매개 변수

argument
DbExpression

캐스트를 적용할 인수입니다.

toType
TypeUsage

캐스팅할 형식을 지정하는 형식 메타데이터입니다.

반환

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

예외

인수 또는 toType이 null입니다.

지정된 캐스트가 잘못된 경우

적용 대상