finds.dev← search

// the find

DapperLib/Dapper

★ 18,313 · C# · NOASSERTION · updated May 2026

Dapper - a simple object mapper for .Net

Dapper is a thin wrapper over ADO.NET that maps SQL query results to C# objects via IL-emitted deserializers cached per query shape. It's for .NET developers who want to write their own SQL but not hand-roll DataReader loops. Battle-tested at Stack Overflow scale.

- Performance is genuinely close to hand-coded ADO.NET - the benchmark shows ~133µs vs ~120µs for SqlCommand on a single-row fetch, with dramatically less allocation than EF Core or NHibernate.

- The query cache uses IL emit to generate typed deserializers once per unique SQL+type combination, so repeated calls pay almost nothing for reflection overhead.

- DynamicParameters with output/return parameters makes stored procedure integration actually usable without fighting the API.

- Works against any ADO.NET provider - SQLite, Postgres, MySQL, Firebird, etc. - with no provider-specific code paths in the core library.

- The IN-list expansion (passing IEnumerable as a parameter) rewrites SQL at runtime by appending numbered params, which defeats query plan caching on the DB side for variable-length lists - a real problem at high QPS.

- Multi-mapping with splitOn is fragile: it relies on column naming conventions and breaks silently if your JOIN returns columns in an unexpected order, requiring you to alias carefully in every query.

- No query building story beyond the separate Dapper.SqlBuilder package, which is basically string concatenation with template slots. Anyone building dynamic WHERE clauses ends up writing their own SQL concatenation logic.

- Dapper.Contrib (CRUD helpers) is effectively unmaintained and the attribute-based table/key mapping is primitive compared to what EF Core's fluent config gives you, so teams either avoid it or end up forking it.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →