RepoDB is a high-performance data productivity platform for .NET developers. At its core is the popular hybrid-ORM library for .NET.
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.
RepoDB solves a complex problem in the 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.
It also addresses a common tension in data access: choosing between the raw performance and control of manual ADO.NET and the productivity of a full-featured ORM. RepoDB brings both together β without forcing a trade-off.
It stays close to the metal while remaining easy to use:
| Feature | Description |
|---|---|
| π 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. |
It goes beyond the ORM with enterprise-grade capabilities for building, operating, and scaling with confidence:
| Feature | Description |
|---|---|
| π¦ 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. |
| ποΈ Multi-DB Support | A growing range of relational database providers with a consistent development experience. |
| Project | Nuget | Downloads | Status |
|---|---|---|---|
| Core | |||
| IBM DB2 π | |||
| IBM DB2 (Bulk) π | |||
| MariaDB π | |||
| MariaDB (Bulk) π | |||
| MariaDB Connector π | |||
| MariaDB Connector (Bulk) π | |||
| MySQL | |||
| MySQL (Bulk) π | |||
| MySQL Connector | |||
| MySQL Connector (Bulk) π | |||
| Oracle π | |||
| Oracle (Bulk) π | |||
| PostgreSQL | |||
| PostgreSQL (Bulk) | |||
| SQL Server | |||
| SQL Server (Bulk) | |||
| SQLite | |||
| Telemetry (Core) π | |||
| Telemetry (Default) π |
Choose your database and follow the quick-start guide:
- ClickHouse
- Db2
- MariaDB β covers both RepoDb.MariaDb and RepoDb.MariaDbConnector
- MySQL
- Oracle
- PostgreSQL
- SQL Server
- SQLite
Explore individual features in the documentation.
Want visibility into what your operations are doing in production? See Telemetry π below to enable opt-in insights with a couple lines of code.
Raw SQL execution methods work with any ADO.NET-compatible provider:
Fluent operations (Query, Insert, Merge, Delete, Update, and more) are supported for SQL Server, Oracle, MySQL, PostgreSQL, IBM DB2 and SQLite.
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();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.
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
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.
We welcome contributions of all kinds β code, docs, bug reports, and ideas.
- Browse for-grabs issues and submit a PR.
- File a new issue to start a discussion.
- Contribute to the documentation site.
- Blog about it, share it, or simply give us a β
- GitHub Issues β bug reports and feature requests.
- Microsoft Teams β live Q&A and community chat.
- X / Twitter β news and updates.
Read our contibuting page for more.
- Building the Solutions
- Coding Standards
- Issuing a Pull Request
- Reporting an Issue
- Support Policy
- Limitations
Thanks to all contributors and to Scott Hanselman for featuring RepoDB.
Tools and projects that make RepoDB possible: GitHub, Microsoft Teams, Moq, NuGet, RawDataAccessBencher, Shields, Microsoft.Data.Sqlite, System.Data.SQLite.Core, MySql.Data, MySqlConnector, Npgsql.
Apache-2.0 β Copyright Β© 2018 Michael Camara Pendon

