iayti / CleanArchitecture

ASP.NET Core 6 Web API Clean Architecture Solution Template
MIT License
654 stars 120 forks source link

How to have Navigation in User Model and Other Entities #28

Closed uthmanrahimi closed 3 years ago

uthmanrahimi commented 3 years ago

Since Our Identity models are in the Infrastructure Layer and other Entities are in the Domain Layer, I was wonder to know how can we have navigation between an Entity and User Model?

For instance, I have two models, User and Content, Each user has 0 or many contents so there should be a List in User Model, and in Content there should be a foreign Key of User

Public class User{

 Public List<Content> Contents{get;set;}

}