Exemple #1
0
        private void InitializeDataBaseConnection()
        {
            FluentNHibernateHelper.InitializeDatabase();

            _barometricPressureDataBaseConnector = new BarometricPressureDataBaseConnector(_eventAggregator);
            _temperatureDataBaseConnector        = new TemperatureDataBaseConnector(_eventAggregator);

            _eventAggregator.GetEvent <NewTemperature>().Subscribe(_temperatureDataBaseConnector.SaveMeasurement);
            _eventAggregator.GetEvent <NewBarPressure>().Subscribe(_barometricPressureDataBaseConnector.SaveMeasurement);
        }