DbExpressionBuilder.TreatAs(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 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
Parameters
- argument
- DbExpression
An expression that specifies the instance.
- treatType
- TypeUsage
Type metadata for the treat-as type.
Returns
A new DbTreatExpression with the specified argument and type.
Exceptions
argument or treatType is null.
treatType is not in the same type hierarchy as the result type of argument.
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.
Entity Framework