Quantcast
Viewing all articles
Browse latest Browse all 27400

Vb linq help group by and sum

I trying to do the following in linq


SELECT SUM(qty) AS Expr1, tblOrderDetails_tblProduct, tblOrderDetails_tblOrders
FROM tblOrderDetailsSet
where Planno = 1
GROUP BY tblOrderDetails_tblProduct, tblOrderDetails_tblOrders


Trying to make this work in Linq Please help

Dim dw = Me.Application.CreateDataWorkspace
Dim Query =
From c In dw.ApplicationData.tblOrderDetailsSet _
Where c.PlanNo = 1 _
Order By c.ProductId Ascending _
Group productid By qtytest = c.qty Into qtyTotal = Group
Select New With {.Product = Product, .qty = qtyTotal.Sum()}

Viewing all articles
Browse latest Browse all 27400

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>