Пример #1
0
        public VuelosRepositories(IConcurrenciaDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _vuelos = database.GetCollection <Vuelo>("Vuelos");
        }
Пример #2
0
        // private readonly IMongoCollection<Origenes_Destino> _origenes;

        public OrigenesRepositories(IConcurrenciaDatabaseSettings settings, HttpClient httpClient)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _origenes        = database.GetCollection <Origenes>("Origenes_Destino");
            _vuelos          = database.GetCollection <Vuelo>("Vuelos");
            this._httpClient = httpClient;
        }