Replies: 1 comment
-
I have an old blog post that talks about how to do this: The approach I would probably take today (and I should update the template) is to have a single public (extension) method inside of Infrastructure that is called by Program.cs and mark everything else inside Infrastructure as internal. And then perhaps add an analyzer or ArchUnit.Net test that verifies that this rule is followed. |
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
-
Why Clean.Architecture.Web.csproj should know about Clean.Architecture.Infrastructure.csproj ?
https://github.com/ardalis/CleanArchitecture/blob/main/src/Clean.Architecture.Web/Clean.Architecture.Web.csproj
As per the demo, UI should only depend on Domain and Infra should depend only on Domain.
The moment we reference Infra in Web project, I think this rule is broken. Isn't it?
https://www.youtube.com/watch?v=zw-ZtB1BNl8
Infra might have been referenced in Web to inject the dependency. Which means, if we are using a DI container, we will not be able to enforce Clean architecture or project reference principles?
Beta Was this translation helpful? Give feedback.
All reactions