locked
Fetching Hierarchical Data in One Query RRS feed

  • Question

  • Hi folks,

    Is there a way to get all linked objects from EF in one large hierarchical query? For example, if I want to get all of a customer's orders and all of those order_details, what query would I use?

    I've tried the following but it doesn't like the second Expand.
       

        Dim query = From c In svcContext.Customers.Expand("Orders").Expand("Order_Details") _
                    Where c.CustomerID = cust.CustomerID

    Thanks for any ideas!

    Ken

    Author: ASP.NET 3.5 For Dummies
    Wednesday, January 7, 2009 7:48 PM

All replies