Ok im trying to get my head around this and i could do with some input from someone else, brains about ready to shut up shop!

So im looking at LINQ to try and pull off records where a confirmed field is equal to null. The confirmed field is a bool value (or bit in SQL) so when i insert the record im putting this value in as null and later determining if it should be true or false. so far i have tired

where O.confirmed.Equals(null)

where O.confirmed == null

I have tried another couple of ways but i still cannot get LINQ to translate properly....

Yes i could just add another field in the db to split this down i just wanted to go down every road before i did this...

Anyone any ideas?

Thanks

Just one more additional item. the LINQ translation for .equals(null) is

{SELECT [t0].[Order Number]
FROM [dbo].[Orders] AS [t0]
WHERE 0 = 1}

for the life of me i cannot get it to say WHERE IS NULL....

Ok got it. O.Confirmed.Equals(null) works i just forgot to refresh my LINQtoSQL diagram after making the changes in the db!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.