- LINQPad 6.x,
- .net core 3.x
- Click
Add connection - Click
View more drivers... - On LINQPad Nuget Manager window, switch the radio button to
Search all drivers - Select package
MongoDB LINQPad driverand clickinstall
- Add connection, choose
Build data context automaticallyand select MongoDB Driver clickNext. - Configure some connection information.
Because MongoDB document is type-less if you want to use the strong-typed document you need to tell the driver where are the type definitions(
Path to typed documents assembly) and which namespace's types will be used.
Note
The collection type will be exposed as
IMongoCollection<BsonDocument>if no type named as collection name had been found in the assembly.