The Dapper Recipes are for developers who want to quickly learn how to use the Dapper in C# by examples. Each recipe is designed to focus on solving specific problems or tasks.
Quick start:
- Download and install the AdventureWorks2022 sample database https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorks2022.bak
- Modify the SQL Server connection string in AppSettings.cs to match with your SQL Server name.
- Open a C# Jupyter notebook .ipynb file with Visual Studio Code and run it.
- What is Dapper and why use it
- How to set up the development environment
- How to connect to a database
- How to execute queries and commands
- How to map query results to objects
- How to use parameters and dynamic parameters
- How to insert, update, and delete a single record
- How to insert, update, and delete multiple records
- How to insert, update, and delete multiple records with Dapper.Contrib.Extensions
- How to perform bulk insert, update, and delete operations