开发者

Linq query to linq extension methods [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist

Closed 9 years ago.

开发者_运维百科 Improve this question

How to write this linq query using extension methods?

var products = from p in db.Products
           join ps in (from pss in db.ProductSpecs
                       where pss.spec_name== "Price"
                       select pss
                       ) on p.id equals ps.product_id into temp
           from t in temp.DefaultIfEmpty()
           orderby t.spec_value
           select p;

Thanks for help!


Get yourself a copy of LinqPad, paste the query into it, execute it and then click on the Lambda tab. It will show you the Method syntax.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜