RepoDB is a fast, lightweight, and open-source .NET ORM that gives you the best of both worlds: the simplicity of a micro-ORM and the power of a full ORM — without the overhead.
Write raw SQL when you need full control. Use fluent methods when you want productivity. Switch between them freely, in the same codebase.
Expand to learn more
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 by Design — 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.
Choose your database and follow the quick-start guide:
Explore individual features in the documentation.
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, MySQL, PostgreSQL, and SQLite.
RepoDB uses ADO.NET's native coercion by default, keeping type mismatches visible and explicit. To enable automatic conversion:
RepoDb.Converter.ConversionType = ConversionType.Automatic;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) |
| Bulk operations | 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.
GlobalConfiguration
.Setup(new GlobalConfigurationOptions { UseRegisteredGlobalTraces = true })
.UseDefaultTelemetry(
host: "https://your-collector-host",
apiKey: "YOUR_API_KEY",
applicationName: "MyApp",
groupName: "Default");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.
- StackOverflow — technical questions.
- Microsoft Teams — live Q&A and community chat.
- X / Twitter — news and updates.
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