Get data on the basis of conditions in entity framework 3.5 with include

Posted by Ashwani K on Stack Overflow See other posts from Stack Overflow or by Ashwani K
Published on 2010-06-15T06:59:58Z Indexed on 2010/06/15 7:02 UTC
Read the original article Hit count: 282

Filed under:

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

© Stack Overflow or respective owner

Related posts about entity-framework