Linq query to linq extension methods [closed]
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 questionHow 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.
精彩评论