Reputation: 37480
I have a table with a nullable DateTime field:
CREATE TABLE [dbo].[myTable](
[ID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
...
[FinishedDate] [datetime] NULL,
etc...
When I try this:
var activeThings = from foo in _context.myTable
where foo.FinishedDate == null
select foo;
foreach ( var thing in activeThings ) {
... do some stuff ...
}
I get no values back. How can I filter this on null values?
Upvotes: 0
Views: 293