In the code I find the maximum date from a table by using
DateTime maxDate = Result.Select(md => md.Date).Max();
However I want to find the next largest date.
In SQL it will be
SELECT MAX([Date]) FROM dbo.FundPrice WHERE [Date] < '2008/02/04'
I am unfamilier with the Linq syntax. I cannot seem to put in a WHERE clause, so how do I do it?