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.LINQPadDriver
and clickinstall
- Add connection, choose
Build data context automatically
and 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
Collection
property, e.g.:Usersdata.Collection
- To access the underlying MongoDB instance, use
Database
- See examples for more information