<p>I really like Entity Framework, but there are some key pieces that are a challenge to me. Can anyone tell me how to filter an EntityDataSource on an Association column? EF hides the FK values and instead has an Association property. Given an Entity, Person, with a PersonType association, I would have expected something like this to work if I want to filter my Person Entity by Type:</p>

<pre><code>GridDataSource.EntityTypeFilter = "it.PersonType.PersonTypeID = 1";
</code></pre>

<p>or</p>

<pre><code>GridDataSource.Where = "it.PersonType.PersonTypeID = '1'";
</code></pre>

<p>or even</p>

<pre><code>GridDataSource.WhereParameters.Add(new Parameter("it.PersonType.PersonTypeID", DbType.Object, "1"));
</code></pre>

<p>but none of those work. Anybody know how to do this?</p>

Have you tried applying the filter in memory using LINQ? (or Perhaps against the database?)
```
```
var personType = new PersonType { Id = 1 };
var query = PersonDataSource.Where(p => p.PersonType.Equals(personType));
// use this query as the DataSource for your GridView
```
```
I must admit I haven't done anything like this, but I have used this trick to update/create an entity without loading the associated entities first.