Share via


DbExpressionBuilder.New Method

Definition

Overloads

New(TypeUsage, IEnumerable<DbExpression>)

Creates a new DbNewInstanceExpression. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.

New(TypeUsage, DbExpression[])

Creates a new DbNewInstanceExpression. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.

New(TypeUsage, IEnumerable<DbExpression>)

Creates a new DbNewInstanceExpression. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.

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

Parameters

instanceType
TypeUsage

The type of the new instance.

arguments
IEnumerable<DbExpression>

Expressions that specify values of the new instances, interpreted according to the instance's type.

Returns

A new DbNewInstanceExpression with the specified type and arguments.

Exceptions

instanceType or arguments is null, or arguments contains null.

arguments is empty or the result types of the contained expressions do not match the requirements of instanceType (as explained in the remarks section).

Applies to

New(TypeUsage, DbExpression[])

Creates a new DbNewInstanceExpression. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.

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

Parameters

instanceType
TypeUsage

The type of the new instance.

arguments
DbExpression[]

Expressions that specify values of the new instances, interpreted according to the instance's type.

Returns

A new DbNewInstanceExpression with the specified type and arguments.

Exceptions

instanceType or arguments is null, or arguments contains null.

arguments is empty or the result types of the contained expressions do not match the requirements of instanceType (as explained in the remarks section).

Applies to