In order to retrieve the highest value of a column in a list of collection, Linq offers a handy method to achieve this;
Dim maxUnitsInStock = Aggregate prod In db.Products _
Into Max(prod.UnitsInStock)
Simple!
In order to retrieve the highest value of a column in a list of collection, Linq offers a handy method to achieve this;
Dim maxUnitsInStock = Aggregate prod In db.Products _
Into Max(prod.UnitsInStock)
Simple!
Leave A Comment
You must be logged in to post a comment.