Apparently this repository implementation is just splitting the includeProperties
parameter by comma (includeProperties.Split(new char[] { ',' }
) and then calls
query = query.Include(includeProperty);
for each element in the result array of the split. For your example you can use a dotted path then:
return Get(x => x.Id == userId, includeProperties: "Friends.Clicks.Urls")
.FirstOrDefault();
It will load all entities on the path from the root User
entity to the last navigation property Urls
.
If you had another navigation property in User
- say Profile
- and you would want to eagerly load that as well, it seems that this syntax is supported then:
return Get(x => x.Id == userId, includeProperties: "Profile,Friends.Clicks.Urls")
.FirstOrDefault();