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

UpdateBatch() public method

Updates a list of data object records of the same type. The default implementation merely calls Update for each one, however some datasources may have more efficient ways of inserting multiple records that the appropriate DaLayer will take advantage of.
public UpdateBatch ( ITransaction transaction, ClassMapping mapping, List criteriaList, 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.
criteriaList List A list of DaoCriteria. /// Each item in the list should represent the criteria for /// rows that will be updated per the accompanying dictionary.
propValueDictionaries object>.List A list of dictionaries of column/value pairs. /// Each item in the list should represent the dictionary of non-ID column/value pairs for /// each respective object being updated.
return void
        public virtual void UpdateBatch(ITransaction transaction, ClassMapping mapping, List<DaoCriteria> criteriaList,
            List<IDictionary<string, object>> propValueDictionaries)
        {
            for (int i = 0; i < criteriaList.Count; i++)
            {
                Update(transaction, mapping, criteriaList[i], propValueDictionaries[i]);
            }
        }