Skip to content

mikependon/RepoDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4,084 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Version MsTeams

RepoDB — a production-ready data access platform for .NET applications.

RepoDB is a high-performance, open-source data productivity platform for .NET developers. At its core is the RepoDB ORM—a fast, lightweight, and flexible data access library that will always remain free and open source. It is the foundation upon which the entire RepoDB ecosystem is being built.

While the ORM continues to evolve and improve, RepoDB is expanding beyond traditional data access by introducing new capabilities that help developers build, operate, and scale enterprise applications more effectively. The goal is not to replace the ORM, but to enhance it with an ecosystem of productivity tools designed for modern software development.

Whether you're building business applications, processing millions of records, integrating multiple data sources, or preparing your systems for AI-driven development, RepoDB provides the flexibility to work the way you want—all through the familiar IDbConnection interface.

Write raw SQL when you need absolute control. Use fluent APIs when productivity matters. Switch seamlessly between both approaches within the same application without sacrificing performance or maintainability.

Packages and Build Status

Project Nuget Downloads Status
RepoDb Build
RepoDb.SqlServer Build
RepoDb.SqlServer.BulkOperations Build
RepoDb.Oracle Build
RepoDb.PostgreSql Build
RepoDb.PostgreSql.BulkOperations Build
RepoDb.MySql Build
RepoDb.MySqlConnector Build
RepoDb.Sqlite.Microsoft Build
RepoDb.Telemetry.Core Build
RepoDb.Telemetry.Default Build

Why RepoDB?

As a hybrid ORM, RepoDB gives you the raw performance and control of manual data access with the convenience of a full-featured library.

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 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.

As a productivity platform, RepoDB goes beyond the ORM with enterprise-grade capabilities that help developers build, operate, and scale with confidence.

Feature Description
Hybrid Data Access Combine raw SQL and fluent APIs in a single, consistent programming model.
Enterprise-Grade Bulk Operations Perform high-performance bulk inserts, updates, merges, and deletes designed for demanding production workloads.
Data Replication & Integration (Planned) Build scalable data movement and synchronization solutions across multiple database platforms.
Default Telemetry with Insights Gain immediate visibility into database operations, execution times, failures, and application behavior with minimal configuration.
Multi-Database Ecosystem Support a growing range of relational database providers with a consistent development experience.
Enterprise Ready Designed for performance, scalability, observability, and long-term maintainability.
AI-Ready Architecture Built to integrate naturally with AI-assisted development, intelligent analytics, and future automation capabilities.

Our Commitment

The RepoDB ORM will always remain the heart of the ecosystem and will continue to be free and open source, just as it has been since the project began.

Our investment is now focused on building additional capabilities around that foundation—expanding RepoDB into a comprehensive suite of enterprise-grade productivity tools for developers, architects, and organizations. Every new capability is designed to complement the ORM, enabling teams to build faster, operate smarter, and prepare their applications for the future without changing the way they work today.

RepoDB is no longer just an ORM in the near future — it is becoming a complete ecosystem for modern data development.

Get Started

Choose your database and follow the quick-start guide:

Explore individual features in the documentation.

Want visibility into what your operations are doing in production? See Telemetry below New to enable opt-in insights with a couple lines of code.

Supported Databases

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.

QueryMultiple Behavior

QueryMultiple/QueryMultipleAsync return several result sets — one per target type — from a single call.

On providers that support multiple SQL statements in a single command text (SQL Server, MySQL, PostgreSQL), RepoDB combines every sub-query into one CommandText, executes it in a single round trip, and steps through the result sets as they come back.

Oracle does not support this. ODP.NET rejects a command text containing more than one SQL statement (IDbSetting.IsMultiStatementExecutable = false for RepoDb.Oracle), so QueryMultiple automatically falls back to issuing one round trip per requested type instead of one combined command. This fallback is transparent — the same QueryMultiple<T1, T2, ...> call works unchanged against Oracle — but it means a call that costs 1 round trip on SQL Server/MySQL/PostgreSQL costs N round trips (one per type) on Oracle. Keep this in mind for latency-sensitive code paths that call QueryMultiple with many types against an Oracle database.

Type Coercion

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

RepoDb.Converter.ConversionType = ConversionType.Automatic;

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)
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.

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(
        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.

Contributions

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

Community

Resources

Contributors

Credits

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.

License

Apache-2.0 — Copyright © 2018 Michael Camara Pendon