Dapper ORM with .NET core
We have worked with Entity Framework to communicate with database. In this article will add Dapper ORM support to existing Invoice Project. Dapper is light weight micro ORM.
GitHub Repo:https://github.com/m-patel90/InvoiceService
Dapper works as set of extension methods for ADO.NET’s connection classes. Dapper supports only querying and updating through raw SQL query.
Invoice service Web API worked with both Entity framework and DAPPR ORM both.
First add nuget package for DAPPR in Invoice.Infra.Data Project.
Design Customer entity, generate migration script and update database.
Modify AppDBContext.cs class
add-migration “add customer entity”
update-database “add customer entity”
It has created customer table in SQL server database.
Design Repository for customer with Dapper ORM. Add ICustomeDapperRepository.cs interface in…