Details
-
Bug
-
Resolution: Done
-
Major - P3
-
1.5
-
None
-
None
Description
http://stackoverflow.com/questions/11705522/query-mongodb-using-c-sharp-nullable-types
Imports MongoDB.Bson
|
Imports MongoDB.Driver
|
Imports MongoDB.Driver.Linq
|
|
|
Module Module1
|
Public Class Test
|
Public Id As ObjectId
|
|
|
Public MyNullableInt As Nullable(Of Integer)
|
End Class
|
|
|
Sub Main()
|
Dim server = MongoServer.Create()
|
Dim db = server.GetDatabase("test")
|
Dim col = db.GetCollection(Of Test)("foos")
|
col.Drop()
|
|
|
|
|
Dim query = col.AsQueryable.Where(Function(p) p.MyNullableInt = 3)
|
|
|
|
|
Dim list = query.ToList()
|
|
|
|
|
End Sub
|
|
|
End Module
|