finds.dev

DapperLib/Dapper

Dapper - a simple object mapper for .Net

View on GitHubHomepage ↗

★ 18,313C#NOASSERTIONupdated May 2026

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
18,313
Forks
3,672
Language
C#
License
NOASSERTION
Last commit
16 May 2026

// nearby

If Dapper isn't quite it.

All repos →