Created
October 16, 2017 13:37
-
-
Save fasetto/939854e9a7c34d9cafd83f1b37ff15ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MongoDataContext | |
{ | |
public IMongoDatabase Database { get; } | |
public MongoDataContext(string connectionString) | |
{ | |
var mongoUrl = new MongoUrl(connectionString); | |
IMongoClient client = new MongoClient(mongoUrl); | |
Database = client.GetDatabase(mongoUrl.DatabaseName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment