Skip to content

Using Dapper has made it difficult to change the database #126

Answered by kgrzybek
m-khooryani asked this question in General
Discussion options

You must be logged in to vote

Hi @m-khooryani,

You can use EF for reads. But you need to be aware (if you want to apply CQRS correctly), that you should map them to a different set of models (data models), not to write models.

So if you use EF to implement reads as I described above this is good solution and what to choose is a matter of choice.

In my opinion, the architectural driver for EF will not be "maybe we change database in the future" because it is very rare situation and even when it needs to be done, it will be a lot of work. ORM is a Leaky Abstraction so you will always depend on database in some level. And I am pretty confident, that EF database providers works different in some scenarios.

In my opinion, …

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@AndreiGanichev
Comment options

@kgrzybek
Comment options

@AndreiGanichev
Comment options

@kgrzybek
Comment options

Answer selected by kgrzybek
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants