public static LoadTestingContext Create(IConnectionStringRepository connectionStringRepository) { if (_loadTestingContext == null) { _loadTestingContext = new LoadTestingContext(); string connectionString = connectionStringRepository.ReadConnectionString("MongoDbWebSuiteContext"); _loadTestingContext.Client = new MongoClient(connectionString); _loadTestingContext.Database = _loadTestingContext.Client.GetDatabase(_databaseName); } return(_loadTestingContext); }
public static LoadTestingContext Create(IConnectionStringRepository connectionStringRepository) { if (_loadTestingContext == null) { _loadTestingContext = new LoadTestingContext(); string connectionString = connectionStringRepository.ReadConnectionString("MongoDbWebSuiteContext"); _loadTestingContext.Client = new MongoClient(connectionString); _loadTestingContext.Database = _loadTestingContext.Client.GetDatabase(_databaseName); } return _loadTestingContext; }