private SignalRService(IHubConnectionContext <dynamic> clients) { Clients = clients; _compareLogic = new CompareLogic(); _dataBase = new BetDemoAppDbContext(); _matches = GetMatchesWithBets(); }
public DataReceiveService() { _database = new BetDemoAppDbContext(); _gameService = new GameService(_database); _eventService = new EventService(_database); _matchService = new MatchService(_database); _betService = new BetService(_database); _oddService = new OddService(_database); }
public void Configuration(IAppBuilder app) { var service = new DataReceiveService(); using (var dbContext = new BetDemoAppDbContext()) { dbContext.Database.Initialize(true); service.GetData(); } GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); RecurringJob.AddOrUpdate(() => CallService(service), Cron.Minutely); app.UseHangfireDashboard(); app.UseHangfireServer(); ConfigureAuth(app); app.MapSignalR(); }
public BetService(BetDemoAppDbContext dataBase) { this._dataBase = dataBase; }