Forget Entity Framework Core! - How to Use Dapper and Strongly Typed IDs
May 22, 2024
• 1,756 views
dapper ormsqlef core vs dapperpostgresqldapper sqldapper rest apidapper mappingmicro ormdapper postgresqldapper orm c#dotnetc# dapper tutorialdapper .net apidapper in asp.net core web apientity frameworkobject relational mapperdapper asp.net coreentity framework core vs dapperdapper asp.netdapper tutorialdapper frameworkasp.net dapperStrongly Typed IDsprimitive obsessionprimitive obsession c#primitive obsession code smellc#
To be clear, there's nothing wrong with using Entity Framework Core. In fact, it's the popular choice for CSharp developers! However, EF Core is now how I like to write my own code. It's just personal preference since I like having the SQL queries in front of me when I'm developing my data access patterns.
Dapper, on the other hand, has been great to use! It perfectly fits my needs. When we combine this with Andrew Lock's StronglyTypedId Nuget package, we can get some great repository APIs to work with. But how can we expand upon the suggested way to integrate Strongly Typed IDs from this package with Dapper?
Let's find out!
