Using Ado.Net Entity framework, I am trying to get the 'top 3' items in a table based on the amount of times they appear in a table.
For example:
Table: basket_to_product_id | basket_id | product_id
I want to see how many times product_id occurs, and would like to return the top 3 product_ids that occur the most frequently.
I'm stuck at:
List<BasketToProduct> btplist = entities.BasketToProduct. ..........?