☄ 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 popular microORM in the .NET ecosystem. It's fast and easy to work with. But, the mapping from SQL to an object can be complicated in some scenarios. Onetoone mapping is straightforward. Onetomany mapping is a bit tricky. So I'll show you how to solve the most common mapping scenarios with Dapper in this video.
Mastering Dapper Relationship Mappings
https://www.milanjovanovic.tech/blog/...
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 Adding Dapper to the project
1:20 Creating the ISqlConnectionFactory interface and using it
2:15 Implementing the first Dapper query
4:27 Implementing the SqlConnectionFactory and registering with DI
6:15 Fixing issues with OnetoOne mapping
9:56 The problem with OnetoMany mapping
15:42 How to solve OnetoMany mapping with Dapper