# Dapper

Dapper: Why Dapper, Query and QuerySingle, Execute: Insert, Update and Delete, Parameters and Mapping to Models.

Updated: November 3, 2026

1. [Why Dapper](https://www.ask-codey.com/lessons/dapper-why-dapper) (Journeyman): Dapper is a small library that keeps your SQL but writes the ADO.NET code around it for you - opening the connection, adding parameters, and turning rows into objects.
2. [Query and QuerySingle](https://www.ask-codey.com/lessons/dapper-query-and-querysingle) (Journeyman): Query&lt;T> reads many rows into objects; QuerySingle, QuerySingleOrDefault, QueryFirst and QueryFirstOrDefault read one; ExecuteScalar&lt;T> reads one value. Pick by how many rows you expect.
3. [Execute: Insert, Update and Delete](https://www.ask-codey.com/lessons/dapper-execute-insert-update-and-delete) (Journeyman): Execute runs INSERT, UPDATE and DELETE and returns how many rows changed. To get a new row's id back, query it with QuerySingle&lt;int>.
4. [Parameters and Mapping to Models](https://www.ask-codey.com/lessons/dapper-parameters-and-mapping-to-models) (Journeyman): Pass parameters as an anonymous object or a model, with property names that match the @ names; lists become IN lists. Columns map to properties by name, so alias any column that doesn't match.

Source: https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/dapper
