var linq = (from i in db.Integral_product_List
where (
(from e in db.Exchange_Emp
group e by e.productID into g
orderby g.Count() descending
select g.Key).Contains(i.productID)
)
select i).Take(10).ToList();
订单表中在所有产品已经出来了,就是不它不按照订单表中产品在数量进行排序,
急,,急。。谢谢了个位。
(from e in db.Exchange_Emp join i in db.Integral_product_List on e.productID == i.productID group by e.productID into g orderby g.Count() descending select e).Take(10)
试试看这样