IApplicationDbContext.cs depends on EF? #750
ChrisDoernen
started this conversation in
General
Replies: 1 comment
-
Sorry folks, it seems my question is discussed here already |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
just a quick question, I am currently learning about Clean Architecture.
As I understand the "dependencies point inwards" rule, in the application circle should not depend on infrastructure details, such as which database is used for persistence. This way we obtain the desired decoupling.
However, IApplicationDbContext.cs depends on EF which breaks this concept. I.e. if we'd like to move to MongoDB, the application circle has to be touched (I don't want to discuss how likely this will happen, but this example is often used as motivation for CA).
So should strictly following CA lead to introduce an abstraction of IApplicationDbContext.cs (or more specifically, DbSet)?
Thanks for sharing this repo!
Chris
Beta Was this translation helpful? Give feedback.
All reactions