Let's say I have an e-commerce site, with different types of products. For instance, books and dvds. I create a model with the following entities:
Catalog
Product
Book (of type Product)
Dvd (of type Product)
Author
Director
Catalog has Products (Books/Dvds)
Book has a collection of Authors
Dvd has a single Director
How would I eager load information about Books and Dvds in the same query?
I tried the following, but get an exception:
var query = from c in em.Catalogs.AddIncludePaths("Products, "Products.Authors", "Products.Director");
I was thinking a Silverlight like syntax might be nice:
var query = from c in em.Catalogs.AddIncludePaths("Products, "Products.(Book.Authors)", "Products.(Dvd.Director)");
Does such a syntax exist?