2015년 1월 7일 수요일

passing lambda expression to collection.Find(...)

I'm following the instructions at the github page and am using what I understand to be the latest version (1.9.2.235)


var list = await collection.Find(=> x.Name == "Jack")

This does not compile for me. The only arguments to find I can see are IMongoQuery. Are the docs out of date or is something else wrong??



The github page is referring to what is in master. To use this code, you'll need to build the driver from master or pull it from our build feed. 

However, the 1.x  branch (which includes 1.9.2.235) has a quickstart for it as well: https://github.com/mongodb/mongo-csharp-driver/tree/v1.x.



thank you. so to confirm, the code in master (and the docs) is *ahead* of the 1.9.2 (nuget) build? Do you typically update nuget after a stable version is published?



The code in master is ahead of the 1.9.2. You can find a tag for 1.9.2 which gives the exact source snapshot of it.

There are some RCs that are also published, 1.10.0-rc1 for example. The code in master is also ahead of those. You can get master build fields here: https://www.myget.org/gallery/mongodb. Any 2.0.0 build is from master.


댓글 없음:

댓글 쓰기