KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Just getting started with Linq to SQL so forgive the newbie question. I'm trying to reproduce the following (working) query in Linq to SQL (VB.NET): Select f.Title, TotalArea = Sum(c.Area) From Firms f Left Join Concessions c on c.FirmID = f.FirmID Group By f.Title Order by Sum(c.Area) DESC (A Firm has many Concessions; a Concession has an area in hectares. I want a list of Firms starting with the ones that have the greatest total area of all their concessions.) I'm imagining something like this as the Linq to SQL equivalent ( pseudo-code ) From f As Firm In Db.Firms _ Order By f.Concessions.Sum(Area) ... but that's not right. Can anyone point me in the right direction?
Tags (comma-separated)
Save Edits
Cancel