C # linq group by where clause

LINQ Group by Clause with Where Clause

I am learning LINQ. Can anybody please help me to solve the following problem!

From Northwind's Customers other Orders tables:

I want to "Find all Customers who have done more than 20 Orders"

The Query in SQL Server for the same is:

But, I could not be able to write the equivalent in LINQ.

I have tried like below:

I am getting the following error in Event Log:

Exception information: Exception type: HttpCompileException Exception message: e: \ Ashok \ WEB \ VS2012 \ CSHWEB \ CSHWEB \ LINQ01.aspx (17): error CS0103: The name 'Orders' does not exist in the current context

The reason is that the dependent Orders table might not be loaded yet. But, I am not understanding how to make it work!

asked Nov 28 '13 at 10:51 am
Ashok kumarAshok kumar
1.32244 gold badges2828 silver badges5454 bronze badges