Ejemplo n.º 1
0
        public SensordataService(IEmonDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _sensordata = database.GetCollection <Sensordata>(settings.SensordataCollectionName);
        }
Ejemplo n.º 2
0
        public SmartmeterPacketService(IEmonDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _smartmeterPackets = database.GetCollection <SmartmeterPacket>(settings.SmartmeterPacketsCollectionName);
        }