public override void AddPatterns(IDictionary <string, IDictionary <int, ICollection <E> > > pats) { try { IConnection conn = null; IPreparedStatement pstmt = null; conn = SQLConnection.GetConnection(); pstmt = GetPreparedStmt(conn); foreach (KeyValuePair <string, IDictionary <int, ICollection <E> > > en in pats) { AddPattern(en.Key, en.Value, pstmt); pstmt.AddBatch(); } pstmt.ExecuteBatch(); conn.Commit(); pstmt.Close(); conn.Close(); } catch (Exception e) { throw new Exception(e); } }