DbExpressionBuilder.CastTo(DbExpression, TypeUsage) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new DbCastExpression that applies a cast operation to a polymorphic argument.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbCastExpression ^ CastTo(System::Data::Common::CommandTrees::DbExpression ^ argument, System::Data::Metadata::Edm::TypeUsage ^ toType);
public static System.Data.Common.CommandTrees.DbCastExpression CastTo (this System.Data.Common.CommandTrees.DbExpression argument, System.Data.Metadata.Edm.TypeUsage toType);
static member CastTo : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.TypeUsage -> System.Data.Common.CommandTrees.DbCastExpression
<Extension()>
Public Function CastTo (argument As DbExpression, toType As TypeUsage) As DbCastExpression
Parameters
- argument
- DbExpression
The argument to which the cast should be applied.
- toType
- TypeUsage
Type metadata that specifies the type to cast to.
Returns
A new DbCastExpression with the specified argument and target type.
Exceptions
Argument
or toType
is null.
The specified cast is not valid.
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา