Accepted answer

I think the answer you're looking for involves using the Include method, such as:"PersonType").Where(a => a.PersonType.PersonTypeID = '1');


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.

Related Query

More Query from same tag