How can I use LINQ to select columns from multiple tables with Count and Group By?
This is my SQL query in C# and I want to convert it to a LINQ query.
string sqlProduct = string.Format(@"SELECT protype.idType, TypeName, **COUNT(idPro) as proNumber**
FROM protype, product
WHERE protype.idType=product.idType
**GROUP BY protype.idType, TypeName**
ORDER BY TypeName");
DataTable dt = new DataTable();
dt = Shop_Query.Select_Query(sqlProduct);
lvMenu.DataSource = dt;
lvMenu.DataBind();