Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

linq top selling products

1.
2.
var query =
3.
    (from item in OrderedItem
4.
    group item.Qty by item.Product into g
5.
    orderby g.Sum() descending
6.
    select g.Key).Take(5); // get the top 5 orders
7.
Source by easysavecode.com #
 
PREVIOUS NEXT
Tagged: #linq #top #selling #products
ADD COMMENT
Topic
Name
6+3 =