Skip to content

C# .NET Core library that helps connecting to a MongoDB database and performing CRUD operations on it using the official driver

License

Notifications You must be signed in to change notification settings

jonaswirth/MongoHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MongoHelper

C# .NET Core library that helps performing CRUD operations on a MongoDB database using the official MongoDB driver.

Install

Get it from nuget.org (https://www.nuget.org/packages/MongoHelper/1.0.1) or install it using the package manager console: PM> Install-Package MongoHelper

Dependencies

Use

Create instance

MongoHelper mongo = new MongoHelper(string DbConnection)
Since the MongoHelper class implements IDisposable it can be used in a using statement aswell.
using(MongoHelper mongo = new MongoHelper(string DbConnection)) { ... }

Select Count

Select the count of all documents in "collection1"
int count = mongo.SelectCount("collection1")

Select count with filter criteria (string, object)
int count = mongo.SelectCount("collection1", "Key", "Value")

Select

Select One

Insert

Update

Delete Not yet implemented.

Builder

About

C# .NET Core library that helps connecting to a MongoDB database and performing CRUD operations on it using the official driver

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages