Preview Support for FirebirdSQL is Now Available in RepoDB

4 minute read

Published:

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

What’s in this preview?

The new RepoDb.Firebird package brings the full RepoDB experience to Firebird:

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

Why Firebird?

Firebird is a mature, open-source RDBMS with a small footprint and a long track record in embedded and on-premise line-of-business systems — the kind of deployment where a lightweight, zero-ceremony data-access layer matters most. It’s also been a recurring request from the community. This preview closes that gap, so teams running on Firebird can get the same fast, hybrid data-access experience RepoDB is known for on other providers.

Bulk Operations, adapted to Firebird

Firebird’s ADO.NET driver, FirebirdSql.Data.FirebirdClient, has no SqlBulkCopy-equivalent API. Rather than skip Bulk Operations for this provider, we wrote our own FirebirdCommandBatcher class — a FbBatchCommand-based bulk-copy implementation that BulkInsert, BulkUpdate, BulkMerge, BulkDelete, and BulkDeleteByKey all sit on top of, batching parameterized statements at the ADO.NET level instead of relying on a native bulk-load protocol the driver doesn’t expose.

A note on batching: this FbBatchCommand-based path is specific to the Bulk Operations package — it’s what lets Bulk operations batch rows per round-trip via BatchSize in the first place. The plain InsertAll, UpdateAll, and MergeAll operations in RepoDb.Firebird are a separate code path and don’t get the same treatment: Firebird’s FbCommand can’t execute multiple statements in a single round-trip, so those three issue one statement per row, and passing a batchSize greater than 1 to any of them throws a NotSupportedException. If you need real batching on Firebird, reach for the Bulk Operations package instead.

Getting started

Install the packages:

> Install-Package RepoDb.Firebird
> Install-Package RepoDb.Firebird.BulkOperations

Then follow the Get Started with Firebird tutorial to wire it up in your application.

Basic CRUD

using (var connection = new FbConnection(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 FbConnection(connectionString))
{
    // ExecuteQuery
    var people = connection.ExecuteQuery<Person>("SELECT * FROM \"Person\" WHERE \"Age\" >= @Age;",
        new { Age = 18 });

    // ExecuteNonQuery
    var affectedRows = connection.ExecuteNonQuery("UPDATE \"Person\" SET \"Age\" = @Age WHERE \"Id\" = @Id;",
        new { Age = 32, Id = 10045 });

    // ExecuteScalar
    var count = connection.ExecuteScalar<int>("SELECT COUNT(*) FROM \"Person\";");
}

Bulk Operations

using (var connection = new FbConnection(connectionString))
{
    // BulkInsert
    var people = GetPeopleToInsert();
    var insertedRows = connection.BulkInsert(people);

    // BulkUpdate
    var peopleToUpdate = GetPeopleToUpdate();
    var updatedRows = connection.BulkUpdate(peopleToUpdate);

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

    // BulkDelete
    var peopleToDelete = GetPeopleToDelete();
    var deletedRows = connection.BulkDelete(peopleToDelete);

    // 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-alpha1, RepoDb.Firebird (and its Bulk Operations counterpart) is still maturing — APIs and behavior, including the batching constraints 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