SQl Querry converting to Linq : select COUNT(prosold.Product_ID) as c,prosold.Product_ID,ProImg.ImagePath from ProductSold as ProSold,ProductImages as ProImg  where ProSold.Product_ID=ProImg.Product_ID  group by ProSold.Product_ID,ProImg.ImagePath order by c desc