Using the Ado.Net Entity framework, I try to get the "top 3" elements in the table depending on the number of times that they appear in the table.
For instance:
Table: basket_to_product_id | basket_id | product_id
I want to see how many times product_id appears, and would like to return the most popular 3 product_ids.
I am stuck in:
List<BasketToProduct> btplist = entities.BasketToProduct. ..........?
source
share