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

想定する型の型メタデータ。

戻り値

指定された引数と型を持つ新しい DbTreatExpression。

例外

argument または treatType が null です。

treatType は、引数の結果の型と同じ型階層にありません。

適用対象