Query a SQL database and get back a list of typed objects without writing conversion code.
Build high-traffic web applications that need fast, safe database access with minimal overhead.
Add database mapping to an existing .NET application without replacing your current database layer.
Process large datasets row-by-row using non-buffered queries to reduce memory usage.
Dapper is a lightweight library for .NET that makes it easier to work with SQL databases from code. In a typical .NET application, querying a database returns raw data that developers must manually convert into the objects their program uses. Dapper automates that mapping step, letting you write a SQL query and immediately get back a list of typed objects without extra boilerplate code. It works by adding extension methods to standard database connection objects, so it slots into existing database code rather than replacing it. The key operations are executing SQL commands that return no data, querying for a list of rows mapped to a specific type, and querying for a single row. You can pass parameters as plain objects, dictionaries, or special parameter collections, and Dapper handles binding them safely to prevent SQL injection attacks. Dapper supports both synchronous and asynchronous database access, and allows queries to return results all at once (buffered) or one row at a time (non-buffered), which is useful for large datasets. The project includes several companion packages: one for building SQL queries dynamically, one that provides simple create, read, update, and delete helpers, and variants that integrate with other data access frameworks. Originally created by the team at Stack Overflow to handle their high-traffic database needs, it is open source and available on NuGet.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.