public PostService(IPikDatabaseSetting settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _post = database.GetCollection <Post>(settings.PostCollectionName); }
public UserService(IPikDatabaseSetting settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _user = database.GetCollection <User>(settings.UserCollectionName); }