# Mapping Rows to Models

Read each row of a query into a new model object, handle NULL columns, and collect the objects in a List&lt;T>.

![Cheat sheet: Mapping Rows to Models](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/864abf1ab65249218fd8beffe7a50184.webp)

- Category: C#
- Level: Journeyman
- Tags: c-sharp, DBNull, t-sql
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/mapping-data-to-models-in-csharp-mapping-rows-to-models-cheat-sheet
