- LLBLGen Pro v5.8
- Using adapter and .NET version
- SQL Server 2014 Management Studio
I'm having trouble getting the record with the minimum datetime for a field using a predicate expression. I've tried the following so far:
Dim transactionPredicateExpression As New SD.LLBLGen.Pro.ORMSupportClasses.PredicateExpression()
transactionPredicateExpression.AddWithAnd(
SD.LLBLGen.Pro.ORMSupportClasses.AggregateFunction.Min(SalesData.Fields.TransactionDate) < thresholdDate)
Dim minTransactionDatePredicate As New SD.LLBLGen.Pro.ORMSupportClasses.FieldCompareSetPredicate(
SalesData.Fields.TransactionDate,
SalesData.Fields.TransactionDate,
SD.LLBLGen.Pro.ORMSupportClasses.AggregateFunction.Min,
SD.LLBLGen.Pro.ORMSupportClasses.SetOperator.Equal,
Nothing
)
but both are incorrect.