Azavea.Open.DAO.AbstractDaLayer.InsertBatch C# (CSharp) Method

InsertBatch() public method

Inserts a list of data object records of the same type. The default implementation merely calls Insert for each one, however some datasources may have more efficient ways of inserting multiple records that the appropriate DaLayer will take advantage of.
public InsertBatch ( ITransaction transaction, ClassMapping mapping, object>.List propValueDictionaries ) : void
transaction ITransaction The transaction to do this as part of.
mapping ClassMapping The mapping of the table or other data container we're dealing with.
propValueDictionaries object>.List A list of dictionaries of column/value pairs. /// Each item in the list should represent the dictionary of column/value pairs for /// each respective object being inserted.
return void
        public virtual void InsertBatch(ITransaction transaction, ClassMapping mapping, List<IDictionary<string, object>> propValueDictionaries)
        {
            foreach(Dictionary<string, object> propValues in propValueDictionaries)
            {
                Insert(transaction, mapping, propValues);
            }
        }