views:

23

answers:

1

I have an EF 4.0 model that has a parent child relationship (say order and orderdetails)

order { [primative] orderid, ordername, ordershipping

[navigation] orderdetails }

orderdetail { orderdetailid, orderpartid, orderquantity, orderpartname }

My question is how do i load orders with orderdetails where the quantity is greater than 1 in LINQ?

for example

var orders = (from o in context.Orders.Include("OrderDetails") where....

any ideas?

A: 

Okay simple answer actually...

http://msmvps.com/blogs/matthieu/archive/2009/10/07/ef-include-with-where-clause.aspx

He answers the question very well actually... Good luck everyone.