What is the best way to manage relationship on abp? Using Navigation Properties on an entity or having single repositories to load single collection of entities? Does the repository pattern discourage the use of navigation properties?
1 Answer(s)
-
0
Hi,
Does the repository pattern discourage the use of navigation properties?
Definetely no. You can use navigation properties when needed. But if you want to follow best practices and DDD, you can check Aggregate pattern rules (search web for details). I suggest you to keep navigation properties minimal and use them if two entities are commonly used together and they may be part of an aggregate. Adding a navigation property makes two entities tightly coupled. So, it depends on your design (single module or multiple module for example)