Пример #1
0
 public static MarketRoboContext Create(IMongoConnectionStringRepository connectionStringRepository)
 {
     if (_loadTestingContext == null)
     {
         _loadTestingContext = new MarketRoboContext();
         string connectionString = connectionStringRepository.ReadConnectionString("MongoDbMarketRoboContext");
         _loadTestingContext.Client = new MongoClient(connectionString);
         _loadTestingContext.Database = _loadTestingContext.Client.GetDatabase(_databaseName);
     }
    
     return _loadTestingContext;
 }
Пример #2
0
 public GenericRepository(IMongoConnectionStringRepository connectionStringRepository)
 {
     if (connectionStringRepository == null) throw new ArgumentNullException("ConnectionStringRepository");
     _connectionStringRepository = connectionStringRepository;
 }