Click or drag to resize

DataAccessAdapterCore.InsertEntitiesDirectlyAsync Method (Type, DynamicQuery, CancellationToken)

Async variant of InsertEntitiesDirectly(Type, DynamicQuery) Inserts all rows matching the select query into the target of the entity specified. Which fields are inserted is defined by the select query. Sequenced Fields are taken care of if they're not specified in the select query. This method will result in an INSERT INTO entityTarget (field1, field2...) SELECT ... statement.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.10.0.0 (5.10.0)
Syntax
public virtual Task<int> InsertEntitiesDirectlyAsync(
	Type targetEntityType,
	DynamicQuery selectQuery,
	CancellationToken cancellationToken
)

Parameters

targetEntityType
Type: System.Type
the entity type which target to insert the rows in
selectQuery
Type: SD.LLBLGen.Pro.QuerySpec.DynamicQuery
the query spec query which will produce the row data to insert
cancellationToken
Type: System.Threading.CancellationToken
The cancellation token

Return Value

Type: Task<Int32>
The number of rows inserted

Implements

IDataAccessAdapter.InsertEntitiesDirectlyAsync(Type, DynamicQuery, CancellationToken)
Remarks
Prefetch paths, paging directives as well as nested queries are ignored in selectQuery.

No inheritance support.
See Also