I have a Product and Category entity in many-to-many association. I am trying to display the category count for each product. So far, I have come up with this:
Dim context = new Context()
Dim products = context.Products()
Dim productsByCategoryCount = From product In Products
Group product By productId = product.productId Into productCount = Count(product.cateogories.Count)
The query executes but doesn’t show the correct result. What am I doing wrong?