How to use the Dapper ORM in C#

Take advantage of the lightweight, open source Dapper to simplify data access and ensure high performance

How to use the Dapper ORM in C#

Object relational mappers (ORMs) have been in use for a long time to eliminate the impedance mismatch that exists between the object models of programming languages and the data models in relational databases. Dapper is an open source, lightweight ORM developed by the Stack Overflow team. Dapper is very fast compared to other ORMs primarily because of its light weight.

Dapper was built with performance and ease of use in mind. It provides support for both static and dynamic object binding using transactions, stored procedures, or bulk inserts of data.

Install Dapper ORM in Visual Studio

To get started using Dapper, follow these steps:

  1. Open Visual Studio 
  2. Click on File -> New -> Project
  3. Select “Web -> ASP.Net Web Application” from the “New Project” dialog
  4. Specify a name for the web project
  5. Select the empty project template for ASP.Net
  6. Click OK to save the project

This creates an empty ASP.Net web application project.

If you have NuGet installed, you can install Dapper using NuGet—just select the project

To continue reading this article register now

How to choose a low-code development platform