Having this model (All properties are Single (not Collection) navigation properties)
- University
- Department
- Classroom
- Teacher
In order to get the dotted name for each level we have to write it manually.
query.Include("Department")
.Include("Department.Classroom")
.Include("Department.Classroom.Teacher")
For the very first level we can use nameof(University.Department)
but for the rest we have two write it manually.
How can we have it as easy as something like nameof(University.Department.Classroom)
?
P.S. I don't want to use Select
or SelectMany
extension methods, I need to have them as string
values.