Exemplo n.º 1
0
 private SignalRService(IHubConnectionContext <dynamic> clients)
 {
     Clients       = clients;
     _compareLogic = new CompareLogic();
     _dataBase     = new BetDemoAppDbContext();
     _matches      = GetMatchesWithBets();
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 public BetService(BetDemoAppDbContext dataBase)
 {
     this._dataBase = dataBase;
 }