Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4,212 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Build Version MsTeams

RepoDB β€” 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.

RepoDB is best for simplifying data layer implementations, processing millions of records, and integrating multiple data sources. 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. You can switch seamlessly between both approaches without sacrificing performance or maintainability.

Easiest to Use .NET ORM

Every operation is an extension method of IDbConnection interface. Simply open a connection and you can start working with your database β€” no need for repositories to scaffold, no context classes, no code generation.

using (var connection = new SqlConnection(ConnectionString))
{
    // Query
    var customer = connection.Query<Customer>(c => c.Id == 10045).FirstOrDefault();

    // Insert
    var id = connection.Insert<Customer>(new Customer { FirstName = "John", LastName = "Doe" });

    // Update
    customer.LastName = "Smith";
    connection.Update<Customer>(customer);

    // Delete
    connection.Delete<Customer>(customer);
}

Moving thousands (or millions) of rows at once? Add the .BulkOperations package for your provider (e.g. RepoDb.SqlServer.BulkOperations) and keep using the same connection:

using (var connection = new SqlConnection(ConnectionString))
{
    var customers = GetCustomers(); // thousands or millions of rows

    connection.BulkInsert<Customer>(customers);
    connection.BulkMerge<Customer>(customers, qualifiers: e => new { e.LastName, e.DateOfBirth });
}

You can do this in all supported DB providers.

Packages and Build Status

Project Nuget Downloads Status
RepoDb.Core Build
RepoDb.SqlServer Build
RepoDb.SqlServer.BulkOperations Build
RepoDb.Oracle πŸ†• Build
RepoDb.Oracle.BulkOperations πŸ†• Build
RepoDb.PostgreSql Build
RepoDb.PostgreSql.BulkOperations Build
RepoDb.MySql Build
RepoDb.MySql.BulkOperations πŸ†• Build
RepoDb.MySqlConnector Build
RepoDb.MySqlConnector.BulkOperations πŸ†• Build
RepoDb.Db2 πŸ†• Build
RepoDb.Db2.BulkOperations πŸ†• 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
🏒 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, Oracle, MySQL, PostgreSQL, IBM DB2 and SQLite.

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)
β˜‘οΈ 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
    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.

Contributions

We welcome contributions of all kinds β€” code, docs, bug reports, and ideas.

Community

Read our contibuting 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, 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

Releases

Packages

Used by

Contributors

Languages