I have two tables
Table Products
-ID
-Name
-Description
...
And
Table Price
-ProductID
-Price
-DateAdded
How do I create a Predicate which we will return the list of products whose price is greater than 10
I tried the following query
Dim predInner As Expression (Of System.Func (Of tblProduct, Boolean)) = PredicateBuilder.True (Of tblProduct) ()
predInner = predInner.And (Function (a As tblProduct) a.tblPrice.Select (Function (c) c.Price). First ()> 10)
pred= pred.And (predInner)
Me.Grid.DataSource = vQuery.Where (pre)
but not always return the last inserted value. Is it possible for this part
a.tblPrice.Select (Function (c) c.Price). First ()
in some way to sort by column DateAdded