This driver allows you to query MongoDB using LINQPad.
This driver is based on the mkjeff's MongoDB driver for .NET.
- LINQPad 7.x,
- .net 6.x
- Click
Add connection - Click
View more drivers... - On LINQPad Nuget Manager window, switch the radio button to
Search all drivers - Select package
Linq2MongoDB.LINQPadDriverand clickinstall
- Add connection, choose
Build data context automaticallyand select MongoDB Driver clickNext. - Configure Connection String, Database Name and optionally Display name (otherwise Host + DB names are used)
- Make queries to your MongoDB database
Note
- Collections will be exposed as capitalized names with all non-alphanumeric characters removed, e.g.: 'users-data' will be exposed as 'Usersdata'
- Collections are exposed as IQueryable, to access the underlying collection use the
Collectionproperty, e.g.:Usersdata.Collection - To access the underlying MongoDB instance, use
Database - See examples for more information