I am connecting my Windows Form app to their Access DB (ugh, I know), and cannot get my linq query to return anything.
var matchDateField = from myRow in boilerDT.AsEnumerable()
where myRow.Field<DateTime>("EntryDate").ToShortDateString() == dateTimePicker1.Value.ToShortDateString()
select myRow;
Any suggestions?
Get all the rows:
Filter by date:
So here you’re using deferred execution which enables multiple queries to be combined or a query to be extended. When a query is extended, it is modified to include the new operations, and the eventual execution will reflect the changes.
The first query returns all the rows and the second query extends the first by using Where to return all the rows with specific date.