Avatar of Mike Eghtebas
Mike Eghtebas
Flag for United States of America

asked on 

Aggregate, LINQ, c#

The following code finds a list of Quantity values ok.

Question: At line 2, how aggregate could be applied to this code to get total quantity?

            Dim s List(Of Order)= (From o In db.Orders Where o.ID = 2).ToList()

            Dim sum = From o In s.OrderItems Select Total = o.Quantity

Open in new window

Visual Basic.NETC#.NET ProgrammingLINQ Query

Avatar of undefined
Last Comment
it_saige

8/22/2022 - Mon