-
Notifications
You must be signed in to change notification settings - Fork 0
TQueryCrudExtensions_InsertListAndReturnIds_q_tRbiB9s8+xcMpSip9UxQ
Jacob Spitzer edited this page Aug 28, 2022
·
2 revisions
Inserts a list of entities into table and returns a list of identity ids.
public static System.Collections.Generic.IEnumerable<int> InsertListAndReturnIds<Table>(this DbEasyConnect.DbEc<Table> tQuery, System.Collections.Generic.List<Table> entities, string keyColumnName="Id");
Table
The type of the records of table class. need to be a class with the [Table("")] attribute.
tQuery
DbEasyConnect.DbEc<Table>
An DbEc<T> to perform the insert command.
entities
System.Collections.Generic.List<Table>
An list of entities to insert.
keyColumnName
System.String
The column that contains the Key/Id that will be used to return
System.Collections.Generic.IEnumerable<System.Int32>
List of identity ids of the new inserted records.