Skip to content

A production-ready data access platform for .NET applications.

RepoDB is a high-performance data productivity platform for .NET developers. At its core is the popular hybrid-ORM library for .NET with clean and easy APIs.

It provides the flexibility to work the way you want — all through the IDbConnection interface. Write raw SQL when you need absolute control, or use the fluent APIs for more productivity, and switch seamlessly between both without sacrificing performance or maintainability.

Why RepoDB?

RepoDB solves a complex problem in the .NET data access space: making bulk operations simple. It is designed to efficiently move millions of records across different database providers. Imagine migrating massive datasets from legacy databases to modern, cloud-native platforms — efficiently, reliably, and with high performance.

As a Productivity Platform

It goes beyond the ORM with enterprise-grade capabilities for building, operating, and scaling with confidence:

  • 📦 Bulk Operations — High-performance bulk inserts, updates, merges, and deletes built for demanding production workloads.
  • 🔄 Data Replication — Scalable data movement and synchronization across multiple database platforms.
  • 📊 Telemetry — Immediate visibility into execution times, failures, and application behavior, with minimal configuration.

As a Hybrid-ORM

It stays close to the metal and remaining lightweight:

  • 👌 Easy to Use — All operations are extension methods on IDbConnection. Open a connection and you're ready to go.
  • 🚀 High Performance — Compiled expressions are cached and reused. RepoDB understands your schema to generate the most efficient execution path ahead of time.
  • 🧠 Memory Efficient — Object properties, execution contexts, mappings, and SQL statements are extracted once and reused throughout the lifetime of your application.
  • 🔀 Hybrid — Use fluent methods for everyday CRUD, drop down to raw SQL for complex queries, or mix both — all within the same connection.
  • 🏆 Battle-Tested — Backed by thousands of unit and integration tests, and used in production systems worldwide.
  • 🆓 Always Free — Apache 2.0 licensed, forever open source.

As a Universal Connector

It bridges different database systems with a single, unified connectivity layer:

  • 🔌 Universal Connectivity — Works with any provider that implements IDbConnection, from SQL Server and PostgreSQL to ClickHouse, DB2, Oracle, and more.
  • 🌉 Cross-Provider Data Movement — Move data between different database engines without writing hand-rolled conversion logic.
  • 🧩 Consistent API Surface — The same fluent methods and conventions work identically regardless of the underlying provider.
  • ⚙️ Provider-Native Optimizations — Each connector is tuned to exploit the bulk and native capabilities of its target database.

Roadmap

RepoDB is evolving from an ORM into a broader data productivity platform, with Data Engineering capabilities — moving data between providers, on-premise or cloud-native — on the roadmap.

Read more about this through this article.

Get Started

Fluent operations (Query, Insert, Merge, Delete, Update, and more), batches and bulks are supported for DB providers mentioned below. Choose your database and follow the quick-start guide:

While raw SQL execution methods work with any ADO.NET-compatible provider:

Explore individual features in the documentation.

Databases on the Roadmap

We have envisioned the following databases to be supported to further grow the ecosystem.

Packages and Build Status

RepoDB ships as a core package plus provider-specific packages for each supported database, with optional bulk-operations add-ons.

See the full package list and build status.

Bulk Operations Support

Every supported database has a dedicated bulk-operations add-on (BulkInsert, BulkMerge, BulkUpdate, BulkDelete), each built on top of that provider's own fastest data-loading mechanism, with sync and async variants:

DB Provider Sync Async Class
ClickHouse ClickHouseBulkCopy / OPTIMIZE_ON_INSERT
DB2 DB2BulkCopy Native (Sync) / Db2BulkArrayBinder (Async Native)
EnterpriseDB EDBBulkCopy (via RepoDb.Connector.EnterpriseDb) via Npgsql Native
Firebird FirebirdCommandBatcher (via FbBatchCommand) Native
MariaDB MariaDbBulkCopy (via RepoDb.Connector.MariaDb) Native
MariaDB Connector MariaDbBulkCopy (via RepoDb.Connector.MariaDbConnector) Native
MySQL MySqlBulkCopy (via MySqlBulkLoader Native)
MySQL Connector MySqlConnectorBulkCopy Native
Oracle OracleBulkCopy Native / OracleBulkArrayBinder (Async Native)
PostgreSQL NpgsqlBinaryImporter Native
SAP HANA ⚠️ HanaBulkCopy Native (Sync) / AsyncOverAsync or SapHanaCommandBatcher
SQL Server SqlBulkCopy Native
Vertica ⚠️ VerticaBulkCopy (via VerticaCopyStream) / Async over Sync

Type Coercion

RepoDB uses ADO.NET's native coercion by default, keeping type mismatches visible and explicit. To enable automatic conversion:

GlobalConfiguration
    .Setup(new Options.GlobalConfigurationOptions()
    {
        ConversionType = ConversionType.Automatic
    })
    .UseSqlServer();

How RepoDB Compares

RepoDB sits between a micro-ORM and a full ORM. Each tool below makes different tradeoffs — pick the one that fits your project:

RepoDB Dapper Entity Framework
Abstraction level ✅ Hybrid — fluent CRUD + raw SQL ❌ Micro-ORM — raw SQL mapping ✅ Full ORM — LINQ, change tracking
Fluent CRUD API ✅ Yes (Insert, Query, Update, Delete, Merge, more) ❌ No — SQL per call ✅ Yes, via LINQ/DbSet
Raw SQL ✅ Yes, mixed freely with fluent calls ✅ Yes — its core model ✅ Yes, via FromSql
Change tracking ❌ None ❌ None ✅ Yes
Migrations ❌ None built-in ❌ None built-in ✅ Yes (EF Migrations)
Native Bulk ✅ Built-in, cross-provider ❌ Via extensions ❌ Via extensions/third-party
Insights / telemetry ✅ Built-in (RepoDb.Telemetry.Default) ❌ None built-in — manual or third-party (e.g. MiniProfiler) ✅ Built-in logging/interceptors; OTel via community packages
Performance ✅ Close to raw ADO.NET ✅ Close to raw ADO.NET ❌ Overhead from tracking/materialization
Best fit ✅ EF-like productivity without losing SQL control ✅ Thinnest possible SQL-to-object mapper ✅ Rich object graphs, LINQ, migrations

Dapper and Entity Framework are both excellent, mature tools — this reflects design tradeoffs, not a ranking.

Telemetry

RepoDB includes opt-in, drop-in telemetry via RepoDb.Telemetry.Default. Enable it once at startup and every operation (Insert, Query, Update, Delete, etc.) is captured and published to your insights collector automatically — no custom ITrace required.

It comes with great and simple dashboards visualization.

Simply docker compose up -d the docker-compose.yml and .env files and integrate your code.

GlobalConfiguration
    .Setup(new GlobalConfigurationOptions { UseRegisteredGlobalTraces = true })
    .UseDefaultTelemetry(new DefaultTelemetryOption("<YOUR_APPLICATION_NAME>")
    {
        Host = "https://your-collector-host",
        ApiKey = "YOUR_API_KEY",
        Group = "<YOUR_APPLICATION_GROUP>",
        Frequency = TimeSpan.FromSeconds(1)
    });

It's intentionally lightweight rather than OTel-based, keeping RepoDB's thin, fast footprint intact. See the package README for configuration options, the full OTel rationale, and the roadmap.

🏢 Enterprise Notice

If your organization is evaluating or adopting RepoDB for production use, keep the following in mind:

  • 🖥️ Run the benchmark on your environment — Published numbers (e.g., the benchmark suite) are produced on infrastructure local to the project (local Docker containers, CI runners, contributor machines). Hardware, network topology, database configuration, cloud provider, virtualization/container overhead, and data volume all materially affect performance, so clone the repository and run the relevant benchmark project(s) against infrastructure and data shapes that mirror your own workload before relying on any published figure.
  • ⚠️ Be aware of the limitations — RepoDB is a micro-ORM built for advanced use cases and has documented, provider-specific limitations (e.g., composite keys, JOINs, cache invalidation, and behaviors specific to SQL Server, Oracle, DB2, and other providers). Review these against your intended usage before committing to production.
  • 🔒 Security is best-effort, not SLA-backed — There is no dedicated security team or response SLA. Read our Security Policy before adopting RepoDB in a security-sensitive context — it covers how to report a vulnerability, which versions get fixes, and the RepoDB-specific risk areas (raw SQL execution, reflection-based provider internals, unscanned third-party driver dependencies) along with how each is mitigated.
  • 🤝 Understand our contributions and support policy — RepoDB is primarily maintained by a single individual, not an organization. Community contributions are welcome and encouraged (see Contributing), and all support is free (for now), but it follows a documented support policy with defined hours and channels rather than an enterprise SLA. Plan your adoption and escalation paths accordingly, and consider contributing back or arranging consultancy for dedicated needs.
  • 🚌 Factor in the bus factor — RepoDB has no formal governance structure today; entitlement, succession, and legal/trademark ownership are not yet defined (see Governance). Account for this single-maintainer risk in your continuity and vendor-risk planning.
  • 🔢 No formal versioning/breaking-change policy — RepoDB does not publish a documented SemVer or deprecation policy, and (per the Security Policy) only the latest release of each package receives fixes — there is no backport process to older majors/minors. Pin exact package versions in production and review release notes before upgrading, rather than assuming strict backward compatibility across releases.

Contributions

We welcome contributions of all kinds — code, docs, bug reports, and ideas.

Community

Read our contributing page for more.

Resources

Contributors

Credits

Thanks to all contributors and to Scott Hanselman for featuring RepoDB.

Tools and projects that make RepoDB possible: GitHub, GitHub Actions, Docker, Microsoft Teams, Moq, MSTest, NuGet, RawDataAccessBencher, Shields, Microsoft.Data.SqlClient, Microsoft.Data.Sqlite, System.Data.SQLite.Core, MySql.Data, MySqlConnector, Npgsql, FirebirdSql.Data.FirebirdClient, Net.IBM.Data.Db2, Oracle.ManagedDataAccess.Core, ClickHouse.Driver, RepoDb.Connector.MariaDb, RepoDb.Connector.MariaDbConnector, Vertica.Data, RepoDb.Connector.EnterpriseDb, Sap.Data.Hana.Net.v6.0.

License

Apache-2.0 — Copyright © 2018 Michael Camara Pendon

Releases

Packages

Used by

Contributors

Languages