我是LINQ的新手,不知道如何按查询编写组。我有一个table with three columns contact_id, order_id, product_id
,我有两个SQL查询
Select Top 10 Count(order_id) 'No. Of Orders', order_id, contact_id from SampleData
Group by order_id, contact_id
Order by 1 Desc
--===========================================================================
--Most Popular products
--===========================================================================
Select Count(order_id) 'Most Popular products', product_id from SampleData
Group by product_id
Order by 1 Desc
如何编写相同的LINQ查询。 在此先感谢。