views:

33

answers:

1

Hello All:

I am using entity framework 3.5 for my application.

I want load data based on some condition e.g.

var data = from e in context.Employee.Include("Employee.Projects") where e.IsActive select e;

Using this, I will get all the Employees which are active with their project details. But I want to load only those projects which are active. So, how to load only active projects using the query?

Thanks Ashwani

A: 

There is no conditional Include version. Take a look at these links at StackOverflow and MSMVPS, hope they will help.

Devart