I am learning LINQ with F#. I want to know how to use lastOrDefault. If I have a SQL Server data table called Days, which store some date, I want to write a query to select the last date of the table, if there is no record, I want to return the unixEpoch, which is the time 00:00:00 UTC on 1 January 1970.
let lastDate =
query {
for day in days do
lastOrDefault
}
Let me know how to return unixEpoch, if there is no record in the data table.
Thanks, John