I am using mongodb c# driver and tried the following query
collection.AsQueryable().Where(x => x.IsArchived.GetValueOrDefault())
where IsArchived is of type bool?
(nullable).
I get the following runtime error:
Unsupported where clause: x.IsArchived.GetValueOrDefault().
Does anybody know how I can query nullable types?