Is there a way I can combine/chain prefetch paths with WithPath in the same sort of way I can with other Linq constructs like Where, etc?
For example I might do something like:
var products = Products.Where(p => p.IsActive);
var blueProducts = products.Where(p => p.Colors.Any(c => c.Name == "Blue"))
So I'd like to do something similar with WithPath, like:
var products = Products.WithPath(p => p.Prefetch(pp => pp.Colors));
var listA = products.WithPath(p => p.Prefetch(pp => pp.Sizes));
var listB = products.WithPath(p => p.Prefetch(pp => pp.Shapes));
Hopefully this makes sense. It's kind of a lame contrived example but I have this similar need with a couple sets of search results that display different properties of a resultset but share some of them in common. I'd rather not have to duplicate these prefetch paths in both if possible but it seems like a new call to WithPath overwrites any previous ones.
Thanks in advance!