0
votes

I want to start using Dapper and also try to use Repository pattern. But I don't understand how to do. I tried this, but this is with EF Repository Pattern C#

So can anybody tell me a simple example for a gerneric repository pattern and the usage of Dapper?

1

1 Answers

0
votes

First of all you need to understand the differences between EF and Dapper. Basically Dapper is a micro-ORM that has minimal features compared with EF. Entity Framework has a lot of features included along with performance improvements and others (more details here).

As the dapper is a Micro-ORM you don't have the same features available in EF. You can use dapper.contrib that has some abstractions that helps you with generic repository.

I have an example in my github an application that use dapper in repository (without dapper.contrib) with clean arch.