Class Libraries Project Reference
I am making a desktop and a Web application and i have two class libraries. DAL and LL. My question is how should I form the dependencies? I need to use Dal in my desktop and web app to make crud operations. I need to use LL in my DAL to access models and some classes. I am trying to make my app according to the SOLID principles. I am very confused.
5 Replies
for example here I use interface ISkiRecommendations
In my program.cs I wanted to replace the interface by using DAL
From your description it sounds like the dependency chain is fairly linear.
Desktop app & web app -> DAL -> LL
Project references in .NET are transitive, so if the DAL references LL, then the desktop app will also be able to 'see' the LL project via the DAL project. Let me know if I am misunderstanding the issue.
Incidentally consider looking into 'vertical slice architecture' or 'hexagonal architecture'. Knowing the different options out there might make it easier to figure out something that fits best with your style/needs.