コード例 #1
0
 public GetExpertStatsHandler(PredictionsContext context, IMapper mapper)
 {
     _context           = context;
     _mapper            = mapper;
     _statService       = new StatService();
     _predictionService = new PredictionService();
 }
コード例 #2
0
 public PredictionsController()
 {
     _context           = new PredictionsContext();
     _expertService     = new ExpertService(_context);
     _tourService       = new TourService(_context);
     _predictionService = new PredictionService(_context);
     _matchService      = new MatchService(_context);
 }
コード例 #3
0
        public DbFixture()
        {
            var options = new DbContextOptionsBuilder <PredictionsContext>()
                          .UseSqlite("Data Source=predictions_test.db")
                          .Options;

            Context = new PredictionsContext(options);
            Context.Database.EnsureDeleted();
            Context.Database.EnsureCreated();
        }
コード例 #4
0
        public RealDbFetchingTests()
        {
            var connectionString =
                "workstation id=Predictions.mssql.somee.com;packet size=4096;user id=cherocky_SQLLogin_1;pwd=fg6ejtwfks;data source=Predictions.mssql.somee.com;persist security info=False;initial catalog=Predictions";

            var options = new DbContextOptionsBuilder <PredictionsContext>()
                          .UseSqlServer(connectionString)
                          .Options;

            _context = new PredictionsContext(options);
        }
コード例 #5
0
        public static async Task <int> GetTourId(this PredictionsContext context, int tourNumber, int tournamentId, CancellationToken cancellationToken)
        {
            var tournament = await context
                             .Tournaments
                             .FetchWithTours(FetchMode.ForRead)
                             .WithIdAsync(tournamentId, cancellationToken);

            var tour = tournament
                       .Tours
                       .WithNumber(tourNumber);

            return(tour.Id);
        }
 public GetPredictionsByTourAndExpertHandler(PredictionsContext context, IMapper mapper)
 {
     _context           = context;
     _mapper            = mapper;
     _predictionService = new PredictionService();
 }
 public GetHeadToHeadTournamentScheduleHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #8
0
 public CreateTournamentHandler(PredictionsContext context)
 {
     _context = context;
 }
コード例 #9
0
 public DbFixture(PredictionsContext context)
 {
     Context = context;
 }
コード例 #10
0
 public GetIncomingTourHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #11
0
 public GetExpertStatsHandler(PredictionsContext context)
 {
     _context           = context;
     _predictionService = new PredictionService();
     _statService       = new StatService();
 }
コード例 #12
0
 public EvaluateHeadToHeadTourHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #13
0
 public CreateExpertHandler(PredictionsContext context)
 {
     _context = context;
 }
コード例 #14
0
 public GetExpertsHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #15
0
 public GetTourPredictionsHandler(PredictionsContext context, IMapper mapper)
 {
     _context           = context;
     _mapper            = mapper;
     _predictionService = new PredictionService();
 }
コード例 #16
0
 public UpdateExpertInfoHandler(PredictionsContext context)
 {
     _context = context;
 }
コード例 #17
0
 public UpdateTourInfoHandler(PredictionsContext context)
 {
     _context = context;
 }
コード例 #18
0
 public GetHeadToHeadToursHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #19
0
 public GetIdByNicknameHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #20
0
 public GetTournamentToursHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #21
0
 public RollbackHeadToHeadTourHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public AddExpertTourPredictionsHandler(PredictionsContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #23
0
 public DeleteTourHandler(PredictionsContext context)
 {
     _context = context;
 }