private static IEnumerable<IDictionary<string, object>> InsertRowsAndReturn(AdoAdapter adapter, string identityFunction, BulkInserterHelper helper, string insertSql, Table table, Func<IDictionary<string, object>, Exception, bool> onError) { var identityColumn = table.Columns.FirstOrDefault(col => col.IsIdentity); if (identityColumn != null) { var selectSql = "select * from " + table.QualifiedName + " where " + identityColumn.QuotedName + " = " + identityFunction; if (adapter.ProviderSupportsCompoundStatements) { return helper.InsertRowsWithCompoundStatement(insertSql, selectSql, onError); } return helper.InsertRowsWithSeparateStatements(insertSql, selectSql, onError); } return null; }
private static IEnumerable <IDictionary <string, object> > InsertRowsAndReturn(AdoAdapter adapter, string identityFunction, BulkInserterHelper helper, string insertSql, Table table) { var identityColumn = table.Columns.FirstOrDefault(col => col.IsIdentity); if (identityColumn != null) { var selectSql = "select * from " + table.QualifiedName + " where " + identityColumn.QuotedName + " = " + identityFunction; if (adapter.ProviderSupportsCompoundStatements) { return(helper.InsertRowsWithCompoundStatement(insertSql, selectSql)); } return(helper.InsertRowsWithSeparateStatements(insertSql, selectSql)); } return(null); }