/// <summary> /// Get the base web service url /// </summary> /// <returns>The base web service url</returns> protected virtual string GetBaseDatabaseString() { return(MongoDBConfig.GetDatabaseString()); }
/// <summary> /// Initializes a new instance of the <see cref="MongoDBDriver{T}" /> class /// </summary> public MongoDBDriver() { this.client = new MongoClient(new MongoUrl(MongoDBConfig.GetConnectionString())); this.database = this.client.GetDatabase(MongoDBConfig.GetDatabaseString()); this.collection = this.database.GetCollection <T>(MongoDBConfig.GetCollectionString()); }
/// <summary> /// Initializes a new instance of the <see cref="MongoDBDriver{T}" /> class /// </summary> /// <param name="collectionString">Name of the collection</param> public MongoDBDriver(string collectionString) { this.Collection = MongoFactory.GetCollection <T>(MongoDBConfig.GetConnectionString(), MongoDBConfig.GetDatabaseString(), collectionString); }
/// <summary> /// Get the email client using connection information from the test run configuration /// </summary> /// <returns>The email connection</returns> public static IMongoCollection <T> GetDefaultCollection <T>() { return(GetCollection <T>(MongoDBConfig.GetConnectionString(), MongoDBConfig.GetDatabaseString(), MongoDBConfig.GetCollectionString())); }