private void MainCycle(object sender, System.Timers.ElapsedEventArgs e) { lock (mainLock) { if (Active) { Console.WriteLine("Entered to MainCycle"); using (var a = new DB_SAPEntities()) { using (var b = new DataAnalysisContext()) { Executor _do = new Executor(a, b); var _dataSQL = a.ADDD.FirstOrDefault(); _do.UpdateSubtances(); _do.UpdatePosts(); _do.UpdateWeather(); _do.UpdateMeasurments(); b.SaveChanges(); } } Console.WriteLine("Exit from MainCycle"); } } }
private void DataUpdater(object sender, System.Timers.ElapsedEventArgs e) { Console.WriteLine("Entered to MainCycle"); DateTime time = new DateTime(2018, 1, 1); using (var a = new DB_SAPEntities()) { using (var b = new DataAnalysisContext()) { Executor _do = new Executor(a, b); _do.AllWeatherDataCheker(time); b.SaveChanges(); } } Console.WriteLine("Exit from MainCycle"); }
public BaseUpdater(DB_SAPEntities _monitoringContext, IDataAnalysisContext _analysisContext) { this._analysisContext = _analysisContext; this._monitoringContext = _monitoringContext; }
public Executor(DB_SAPEntities _Monitoring, DataAnalysisContext _Analysis) { Moniroting = _Monitoring; Analysis = _Analysis; }
public SubstanceUpdater(DB_SAPEntities _monitoringContext, IDataAnalysisContext _analysisContext) : base(_monitoringContext, _analysisContext) { }
public MeasurementUpdater(DB_SAPEntities _monitoringContext, IDataAnalysisContext _analysisContext) : base(_monitoringContext, _analysisContext) { numOfRows = 5_000; }
public WeatherUpdater(DB_SAPEntities _monitoringContext, IDataAnalysisContext _analysisContext) : base(_monitoringContext, _analysisContext) { }
public Executor(DB_SAPEntities monitoringContext, IDataAnalysisContext dataAnalysisContext) { _monitoringContext = monitoringContext; _dataAnalysisContext = dataAnalysisContext; }