Exemplo n.º 1
0
        public BulletService(IBulletToDoDatabase settings)
        {
            _client = new MongoClient(settings.ConnectionString);

            var database = _client.GetDatabase(settings.DatabaseName);

            _notes = database.GetCollection <BulletNote>(settings.BulletCollectionName);
        }
        public void Setup()
        {
            settings = new BulletToDoDatabase
            {
                BulletCollectionName = "BulletData",
                ConnectionString     = "mongodb://*****:*****@localhost:27020/?authSource=admin&authMechanism=SCRAM-SHA-256&readPreference=primary&ssl=false",
                DatabaseName         = "BulletDB"
            };

            service = new BulletService(settings);

            _notes = new List <BulletNote>();
        }