Preview Support for EnterpriseDB is Now Available in RepoDB

6 minute read

Published:

We are excited to announce the preview release of EnterpriseDB support for RepoDB — bringing our hybrid ORM’s fluent CRUD, raw-SQL, and Bulk Operations capabilities to EDB Postgres Advanced Server for the first time, right out of the gate.

What’s in this preview?

The new RepoDb.EnterpriseDb package brings the full RepoDB experience to EnterpriseDB, built on top of the official EnterpriseDB.EDBClient driver:

It follows the same programming model you already use with our SQL Server, PostgreSQL, MySQL, SQLite, Oracle, DB2, MariaDB, Firebird, Vertica, and SAP HANA extensions — the same fluent API, the same lightweight philosophy, now targeting EnterpriseDB.

Why EnterpriseDB?

EDB Postgres Advanced Server is the enterprise-hardened, Oracle-compatible PostgreSQL distribution many regulated and large-scale shops standardize on when they need PostgreSQL with commercial support, security certifications, and Oracle-migration features baked in. It’s PostgreSQL-adjacent but not PostgreSQL — close enough that teams expect a familiar experience, different enough that a provider built specifically for it, rather than assumed compatible by accident, is worth having. This preview gives EDB Postgres Advanced Server users the same fast, hybrid data-access experience RepoDB is known for elsewhere.

EnterpriseDB has a few quirks of its own — worth knowing up front

EDB Postgres Advanced Server’s driver landscape and SQL dialect come with a handful of behaviors RepoDB has had to design around explicitly:

  • Two different EDBConnection types, depending on the package. The core provider works against either the official EnterpriseDB.EDBClient.EDBConnection driver or our own Npgsql-backed connector’s EDBConnection — see EnterpriseDB Connector below. RepoDb.EnterpriseDb.BulkOperations, however, only works against the latter. Mixing them up is an easy first mistake.
  • InsertAll doesn’t return generated identities. EDB Postgres rejects a RETURNING clause against a sub-table VALUES expression, so InsertAll can’t append one. Generated identities only come back via Insert or the bulk operations package.
  • Merge compiles to INSERT ... ON CONFLICT DO UPDATE, with OVERRIDING SYSTEM VALUE added automatically when an explicit identity value is being inserted.
  • Table hints aren’t supported. AreTableHintsSupported is false; passing a non-null hints argument throws a NotSupportedException.
  • Bulk staging tables use deterministic names, not per-call-unique ones. A pseudo table is named from the staging type, the target table, and the operation (e.g. PhysicalPersonMerge), so two concurrent bulk calls of the same operation against the same table, both resolving to the same staging type, can interfere with each other’s staged rows. Unlike SAP HANA, though, Memory here is a genuinely implemented, session-scoped TEMP table — prefer it over Physical when running concurrent bulk operations against the same table.
  • EDB Postgres Advanced Server only. Behavior against community PostgreSQL isn’t a design goal of this provider — use RepoDb.PostgreSql for that instead.

None of this is a RepoDB shortcoming — it’s EDB Postgres Advanced Server’s own driver and SQL-dialect behavior, and the provider is built to work within those constraints rather than silently mask them.

EnterpriseDB Connector

The bulk-load path behind RepoDb.EnterpriseDb.BulkOperations is powered by RepoDb.Connector.EnterpriseDb — the Npgsql-backed EnterpriseDB connector from our RepoDB Connectors project. It supplies EDBBulkCopy (built on Npgsql’s native binary COPY protocol) and the EDBConnection type the bulk operations package is built against — distinct from the official EnterpriseDB.EDBClient.EDBConnection driver used by the core provider.

The EDB prefixes on this connector’s objects (EDBConnection, EDBBulkCopy, and the rest) are intentional, for API compatibility — so that users can switch to the official EnterpriseDB NuGet package with less restrictions and less code modifications.

Getting started

Install the packages:

> Install-Package RepoDb.EnterpriseDb -Version 0.0.1-alpha
> Install-Package RepoDb.EnterpriseDb.BulkOperations -Version 0.0.1-alpha

Initialize it once at startup:

GlobalConfiguration
    .Setup()
    .UseEnterpriseDb();

Basic CRUD

using (var connection = new EDBConnection(connectionString))
{
    // Insert
    var person = new Person { Name = "John Doe", Age = 30, CreatedDateUtc = DateTime.UtcNow };
    var id = connection.Insert(person);

    // Query
    var queriedPerson = connection.Query<Person>(e => e.Id == id).FirstOrDefault();

    // Update
    queriedPerson.Age = 31;
    var updatedRows = connection.Update(queriedPerson);

    // Delete
    var deletedRows = connection.Delete<Person>(id);

    // Merge
    var mergedPerson = new Person { Id = id, Name = "John Doe", Age = 32, CreatedDateUtc = DateTime.UtcNow };
    var mergeResult = connection.Merge(mergedPerson);
}

Raw-SQL

using (var connection = new EDBConnection(connectionString))
{
    var people = connection.ExecuteQuery<Person>("SELECT * FROM \"Person\" ORDER BY \"Id\" ASC;");

    var affectedRows = connection.ExecuteNonQuery("DELETE FROM \"Person\" WHERE \"Id\" = @Id;",
        new { Id = 10045 });

    var maxId = connection.ExecuteScalar<long>("SELECT MAX(\"Id\") FROM \"Person\";");
}

Bulk Operations

Bulk operations require the EnterpriseDB Connector’s EDBConnection, not the official driver’s connection type of the same name.

using (var connection = new EDBConnection(connectionString))
{
    // BulkInsert — streamed through EDBBulkCopy's native binary COPY protocol
    var people = GetPeopleToInsert();
    var insertedRows = connection.BulkInsert(people);

    // BulkMerge
    var peopleToMerge = GetPeopleToMerge();
    var mergedRows = connection.BulkMerge(peopleToMerge, qualifiers: e => e.Id);

    // BulkDeleteByKey
    var keysToDelete = new long[] { 10045, 10046, 10047 };
    var deletedByKeyRows = connection.BulkDeleteByKey("Person", keysToDelete);
}

A preview, not a final release

As a preview package at v0.0.1-alpha, RepoDb.EnterpriseDb (and its Bulk Operations counterpart) is still maturing — APIs and behavior, including the caveats described above, may change before a stable release ships. We would love to hear your feedback as you try it out; it directly shapes what we prioritize on the way to general availability.


~ Conceptualized by me. Reviewed and checked by AI. Refined and gatekept by me. ~

Please support us

Give a ⭐ to our Github repository | Follow me at X / Twitter | Connect with us at our official Teams Channel
Apache License 2.0 — Copyright © 2026 by Michael Camara Pendon / Create a Request