public static void Execute(this IEnumerable<DbCommand> commands, string connStringName) { var db=new DbCommon(connStringName); db.ExecuteTransaction(commands.ToArray()); }
public static void Execute(this SortedList<int,DbCommand> commands, string connStringName) { //using a sorted list here to allow for sequential execution var db = new DbCommon(connStringName); db.ExecuteTransaction(commands); }