Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build status Build status

Nuget status


A data access / object composition library built on top of Dapper

Ever just wanted to execute a bit of SQL without jumping through the hoops imposed by other frameworks? Are you annoyed by the quirks of the monolithic ORM's? Tired of the limitations their design impose on your code? Tired of fighting the framework?

Then Drapper is for you. Drapper deliberately stays out of your way allowing you the choice of how to build your application your way.

You provide Drapper with the SQL to be executed. There is no auto-generated SQL. You will know the needs of your application better than any auto-generated SQL provider. That said, if you really do want auto-generated SQL you can plug this into Drapper by implementing an ICommandReader that will return a CommandSetting for you.

Quick Look

The heart of Drapper is the IDbCommander. It's an interface which exposes overloads of only 2 methods - Query and Execute. Query is used for data retrieval operations while Execute is used for persistence/data changing operations. Both methods come in Async flavours as well.


IDbCommander _commander;

// retrieve all

// retrieve with parameters
_commander.Query<Country>(new { language = "English" });

// retrieve single
_commander.Query<Country>(new { code = "ZA" }).SingleOrDefault();

// map complex types
_commander.Query<Country, Currency, Country>(
    (country, currency) => 
        country.Currency = currency; 
        return country; 

// map _really_ complex types
_commander.Query(Map.ReallyComplexMapping); // where Map.ComplexMapping is a Func<> with up to 16 inputs!


// all persistence operations are transactional. 
// transactions spanning multiple instances are automatically
// escalated to DTC. 

// persist a complex type

// persist an object graph. each Execute call
// can target a different database instance if 
// you need it to! 
_commander.Execute(() => 
        _commander.Execute(country.Currency, method:"SaveCurrency");
        _commander.Execute(country.States, method:"SaveStates");

Drapper allows you to build complex object graphs from your data with ease as well as persist objects in a consistent, predictable and reliable way.

Drapper was built on top of the Dapper Micro ORM and works across all the same providers supported by Dapper including SQLite, SQL CE, Firebird, Oracle, MySQL, PostgreSQL and SQL Server.

Drapper? This project started as a "wrapper for Dapper". The portmanteau kinda wrote itself.


An abstraction layer for Dapper







No releases published


No packages published