Пример #1
0
        public SimulationRepository(IConnectionStringProvider connectionStringProvider)
        {
            var client   = new MongoClient(connectionStringProvider.GetConnectionString());
            var database = client.GetDatabase(connectionStringProvider.GetDatabase());

            _simulations = database.GetCollection <Simulation>(connectionStringProvider.GetSimulaionCollectionName());
        }
Пример #2
0
        public StrategyRepository(IConnectionStringProvider connectionStringProvider)
        {
            var client   = new MongoClient(connectionStringProvider.GetConnectionString());
            var database = client.GetDatabase(connectionStringProvider.GetDatabase());

            _strategies = database.GetCollection <Strategy>(connectionStringProvider.GetStrategyCollectionName());
        }