public OverviewService(IConfiguration config, ITrendsService service)
 {
     Context = new CryptoTideDBContext(config);
     // TODO(Serban): Hacky, will need to keep value in memory and be updated by the data pipeline
     try
     {
         // Errors if max is 0
         LastHour = Context.HourlyTrends.Where(t => t.Date == DateTime.Now.Date).Max(t => t.Hour);
     }
     catch
     {
         LastHour = 0;
     }
 }
Esempio n. 2
0
 public IngressService(IConfiguration config, IDBUnitOfWork uow)
 {
     Context    = new CryptoTideDBContext(config);
     UnitOfWork = uow;
 }
Esempio n. 3
0
 public DBUnitOfWork(IConfiguration config)
 {
     context = new CryptoTideDBContext(config);
 }