Rock YouTube channel with real views, likes and subscribers
Get Free YouTube Subscribers, Views and Likes

Building a Dapper CRUD API From Scratch In .NET 7 - For Beginners

Follow
Milan Jovanović

☄ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt
Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ
Support me on Patreon to access the source code:   / milanjovanovic  

Dapper is a microORM for SQL databases. It provides simple querying capabilities, and it's also one of the fastest ORMs in the market. Dapper is often compared to EF, but I consider them complementary tools. In this video, I'll show you how to build a complete CRUD API using Dapper and .NET 7. This will be a beginnerfriendly video.

Join my weekly .NET newsletter:
https://www.milanjovanovic.tech

Read my Blog here:
https://www.milanjovanovic.tech/blog

Subscribe for more:
   / @milanjovanovictech  

Chapters:
0:00 Creating a Minimal API with .NET 7
1:14 Installing Dapper and adding the connection string
2:43 Adding a class to represent the database table
3:31 Creating the GET endpoint to fetch all customers
7:47 Moving Minimal API endpoints to a static class
8:52 Implementing the SqlConnectionFactory
11:27 Creating the GET endpoint to fetch a single customer
13:59 Adding the POST endpoint for creating customers
17:04 Implementing the PUT endpoint for updating a customer
19:59 Creating the DELETE endpoint for deleting a customer
21:35 Using a Route Group to simplify Minimal APIs

posted by laydlayout5kn