Vaccano
Vaccano

Reputation: 82477

How to "Expand" a property using LinqPad and Entity Framework

I have an entity set (lets call it Clients) that I am querying using LinqPad.

It is accessing the data via Entity Framework. I am able to connect just fine and see most of my data.

However, Clients has a property called Location. Location contains several properties by itself (State, City, Zip).

When I return all the Clients, the rows with no location show null. But the rows that have a location just have an empty square. (It is missing the box that has the data for the matching row of Location that is in the database.)

I know that my data is there and good. (I am able to query it just fine using OData: Clients.Expand("Location").

How can I do an "Expand" (or what ever is needed) to get to see the other associations/navigation properties in my result set?

Upvotes: 2

Views: 1952

Answers (1)

Jeff Ogata
Jeff Ogata

Reputation: 57813

I haven't tested it in LinQPad, but would try using Include: Clients.Include("Location")

Upvotes: 3

Related Questions