开发者

How to partially load entity framework POCO

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 { orderdetai开发者_如何学运维lid, 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?


Okay simple answer actually...

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜