linq - Is AsQueryable method departed in new Mongodb C# driver 2.0rc? -


first of i'm new mongodb. in mongodb c# driver 1.9.x, can take collections queryable asqueryable method this.

        var db = client.getserver().getdatabase("test");         var col = db.getcollection("video");         var qrlist = col.asqueryable(); 

i installed new driver 2.0rc , while using it, cannot use asqueryable method because missing. departed or there way accomplish this? (i have included mongodb.driver.linq).

        var db = client.getdatabase("test");         var col = db.getcollection<contact>("contact"); //getcollection without <t> missing to.         var qrlist = col.asqueryable(); // asqueryable missing here. 

how can entities queryable in new driver, need mongodb gurus. thank you.

19 october update:

mongodb 2.1 driver out https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.1.0

it supports linq:

linq

csharp-935 linq support has been rewritten , targets aggregation framework. more natural translation , enables many features of linq not able translated.

simply use new asqueryable method work linq.

18 september update:

mongodb 2.1 driver rc should support it. see https://jira.mongodb.org/browse/csharp-935

finally 2.1 rc came out. great work!

old answer:

no, asqueryable unsupported: https://jira.mongodb.org/browse/csharp-935

type: epic status:open priority: major - p3 resolution: unresolved

and hourse's mouth: craig wilson on google forum

yes, there no asqueryable on new api. can track feature here (https://jira.mongodb.org/browse/csharp-935). didn't have enough time completed , tested thoroughly. scheduled 2.1 , priority us. until then, have integrated expression tree functionality find , aggregate methods (and of write methods filtering) such may not need full linq implementation. instance, see sample test class here example: https://github.com/mongodb/mongo-csharp-driver/blob/master/src/mongodb.driver.tests/samples/aggregationsample.cs#l77


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -