I would like to know if someone can assist me with this little dilemma...
I am following a clean architecture project setup using .net core 3.1. With projects:
- API
- Domain
- Infrastructure
- Application
In Domain I do not reference any projects (or package) everything else references from it.
And I have the table below in Domain:
I have added my identity to the Infrastructure later in which I have have a ApplicationUser which extends IdentityUser.
So the scenario is as follows:
- user signs up and later gets attached to a company. A company can have many users (this being AspNetUser)
- So when a user signs in he is attached to that company and can do certain actions under that company
- And when I retrieve the company it will have a list of users thats attached to it.
So the question I have is, what do I do so that I can have a Company with a collection of users, also without having to add a reference From Domain to infrastructure