1

I've created a .NET Core MVC product with Entity Framework, and am being tasked with creating "Add-on" products, which give CRUD operations to more tables, but use the same library functions and UI.

From a software engineering perspective, I found this a good opportunity to break my one huge project into multiple projects - the first time I'm doing something like this. This will help decouple the system.

Consider the following MS Paint diagram that illustrates how I envision this:

enter image description here

As mentioned, my current set up is thus:

Solution MainProduct
├── MainProduct

Would this set up work, considering how EF Core functions? Can the Contexts and Migrations (The DAL) be in the Class Library?

Solution MainProduct
├── MainProduct
├── ClassLibrary
├── UnitTests
├── Addon1
├── Addon2

I understand this is a broad question, but I'd like this current setup evaluated. Any resources would be appreciated too.

2
  • Is your DAL entirely within the "class library"? To be honest, your diagram still clumps everything from the backend together so it's quite hard to see where the separations are that are causing you concern. I'm struggling to see a problem other than the basics of having projects that reference each other in a solution. Am I missing something else? Commented Nov 20, 2019 at 14:11
  • Yes, the DAL (migrations, contexts, POCOs) are in the class library, even for the AddOn project tables. The backend such as controllers (and views) are separate between the projects, but will reuse the class library. the basics of having projects that reference each other in a solution - this is my problem. I'm sure I can try to smash this together today but I'm sure there is a pitfall in my design. Commented Nov 20, 2019 at 15:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.