MongoDB C# Driver 2.0.0-beta2 AsQueryable() missing

1,008 views
Skip to first unread message

torn...@gmail.com

unread,
Feb 13, 2015, 3:07:10 PM2/13/15
to mongod...@googlegroups.com
Hi,
I'm currently trying the new 2.0 beta driver but I'm missing the AsQueryable() extension. The old linq part was apparently moved to legacy and I do not see any way to run all my old linq queries (both lambda and the other syntax).
Are there any plans to bring that back or do I need to implement my own QueryableProvider or skip the 2.0 driver?

Regards,
Torni.

Craig Wilson

unread,
Feb 13, 2015, 3:41:25 PM2/13/15
to mongod...@googlegroups.com
Hi Torni,

Yes, there is currently no AsQueryable on the new api. You can track this feature here (https://jira.mongodb.org/browse/CSHARP-935). We simply didn't have enough time to get it completed and tested thoroughly. It is scheduled for 2.1 and is a priority for us.  Until then, we have integrated expression tree functionality into the Find and Aggregate methods (and some of the write methods for filtering) such that you may not need a full LINQ implementation. For instance, see the sample test class here as an example: https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver.Tests/Samples/AggregationSample.cs#L77

Thanks for checking in,
Craig

Dreamwalker

unread,
Feb 18, 2015, 8:12:02 AM2/18/15
to mongod...@googlegroups.com
Hi, Craig

I think you should update the breaking changes section to include this information as I think it will be a common thing people use.

https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.0.0-beta2

Craig Wilson

unread,
Feb 18, 2015, 12:17:01 PM2/18/15
to mongod...@googlegroups.com
We can certainly call that out, but it's not really a breaking change. If you pull down the same nuget package (mongocsharpdriver), your LINQ code will still work as it always has. It's currently just an omission from a new API. Perhaps a Roadmap section to the release notes would be a more apt location for this and a few other things such as GridFS.

Tom Brewer

unread,
Aug 31, 2015, 4:17:03 PM8/31/15
to mongodb-user
Hey how's it coming with the LINQ support - does it look likely it'll get done this year?

Craig Wilson

unread,
Aug 31, 2015, 5:03:26 PM8/31/15
to mongodb-user
Yes, it's currently in code review and we are almost feature complete for 2.1. Stay tuned for an RC fairly soon.
Reply all
Reply to author
Forward
0 new messages