语言

DbExpressionBuilder.New 方法

定义

重载

名称 说明
New(TypeUsage, IEnumerable<DbExpression>)

创建新的 DbNewInstanceExpression。 如果类型参数是集合类型,则参数指定集合的元素。 否则,参数将用作新实例中的属性或列值。

New(TypeUsage, DbExpression[])

创建新的 DbNewInstanceExpression。 如果类型参数是集合类型,则参数指定集合的元素。 否则,参数将用作新实例中的属性或列值。

New(TypeUsage, IEnumerable<DbExpression>)

创建新的 DbNewInstanceExpression。 如果类型参数是集合类型,则参数指定集合的元素。 否则,参数将用作新实例中的属性或列值。

public static System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression New(this System.Data.Entity.Core.Metadata.Edm.TypeUsage instanceType, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Common.CommandTrees.DbExpression> arguments);
static member New : System.Data.Entity.Core.Metadata.Edm.TypeUsage * seq<System.Data.Entity.Core.Common.CommandTrees.DbExpression> -> System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression
<Extension()>
Public Function New (instanceType As TypeUsage, arguments As IEnumerable(Of DbExpression)) As DbNewInstanceExpression

参数

instanceType
TypeUsage

新实例的类型。

arguments
IEnumerable<DbExpression>

指定新实例值的表达式,根据实例的类型进行解释。

返回

具有指定类型和参数的新 DbNewInstanceExpression。

例外

instanceType 或参数为 null,或参数包含 null。

参数为空或包含表达式的结果类型与 instanceType 的要求不匹配(如备注部分所述)。

适用于

New(TypeUsage, DbExpression[])

创建新的 DbNewInstanceExpression。 如果类型参数是集合类型,则参数指定集合的元素。 否则,参数将用作新实例中的属性或列值。

public static System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression New(this System.Data.Entity.Core.Metadata.Edm.TypeUsage instanceType, params System.Data.Entity.Core.Common.CommandTrees.DbExpression[] arguments);
static member New : System.Data.Entity.Core.Metadata.Edm.TypeUsage * System.Data.Entity.Core.Common.CommandTrees.DbExpression[] -> System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression
<Extension()>
Public Function New (instanceType As TypeUsage, ParamArray arguments As DbExpression()) As DbNewInstanceExpression

参数

instanceType
TypeUsage

新实例的类型。

arguments
DbExpression[]

指定新实例值的表达式,根据实例的类型进行解释。

返回

具有指定类型和参数的新 DbNewInstanceExpression。

例外

instanceType 或参数为 null,或参数包含 null。

参数为空或包含表达式的结果类型与 instanceType 的要求不匹配(如备注部分所述)。

适用于