public PredictionsController( IPredictionsService predictionsService, UserManager <ApplicationUser> userManager) { this.predictionsService = predictionsService; this.userManager = userManager; }
public MatchesController(ITeamsService ts, IMatchService ms, IMapper mapper, IPredictionsService ps) { this.ts = ts; this.ms = ms; this.mapper = mapper; this.ps = ps; }
public PredictionsController(IGamblersService gamblers, IPredictionsService predictions, IGamesService games, IPlayersService players) { this.gamblers = gamblers; this.predictions = predictions; this.games = games; this.players = players; }
public UsersController(IUsersService us, IMapper mapper, IPredictionsService ps, ITeamsService ts, UserManager <ApplicationUser> userManager) { this.us = us; this.mapper = mapper; this.ps = ps; this.ts = ts; this.userManager = userManager; }
public GamesController(ITeamsService teams, IGamesService games, IPlayersService players, IPredictionsService predictions, IGamblersService gamblers) { this.teams = teams; this.games = games; this.players = players; this.predictions = predictions; this.gamblers = gamblers; }
public UserController( UserManager <ApplicationUser> userManager, IPredictionsService predictionsService, IUsersService usersService) { this.userManager = userManager; this.predictionsService = predictionsService; this.usersService = usersService; }
public PredictionsController(ITeamsService ts, IMatchService ms, IPredictionsService ps, IMapper mapper, UserManager <ApplicationUser> userManager) { this.ts = ts; this.ms = ms; this.ps = ps; this.mapper = mapper; this.userManager = userManager; }
public GraphDataService( IGraphDataQuery query, IPredictionsService predictionsService, ILogger <GraphDataService> logger ) { _query = query; _predictionsService = predictionsService; _logger = logger; }
public ManageDataController(IGamesService games, IPredictionsService predictions, IPlayersService players, ITeamsService teams) { this.games = games; this.predictions = predictions; this.players = players; this.teams = teams; }
public PredictionsServiceTest() { this.InitializeDbAndRepositories(); this.predictionsService = new PredictionsService( this.predictionsRepository, this.fixtureRepository, this.followingRepository, this.usersRepository); this.SeedDatabase(); }
public PredictionsController( UserManager <ApplicationUser> userManager, IPredictionsService predictionsService, ICountriesService countriesService, ILeaguesService leaguesService, IFixturesService fixturesService, IUsersService usersService) { this.predictionsService = predictionsService; this.countriesService = countriesService; this.leaguesService = leaguesService; this.fixturesService = fixturesService; this.usersService = usersService; this.userManager = userManager; }
public BusPredictionsHandler( IDistributedCache cache, IRouteRepo routeRepo, IPredictionsService predictionsService, IBusPredictionRepo predictionRepo, IRouteMessageFormatter routeMessageFormatter, ILogger <BusPredictionsHandler> logger ) { _cache = cache; _routeRepo = routeRepo; _predictionsService = predictionsService; _predictionRepo = predictionRepo; _routeMessageFormatter = routeMessageFormatter; _logger = logger; }
public MoviePredictionController(IPredictionsService predictionService, IRatingRepository ratingRepository) { _service = predictionService; _ratingRepository = ratingRepository; }
public HomeController(IGamesService games, IGamblersService gamblers, IPredictionsService predictions) { this.games = games; this.gamblers = gamblers; this.predictions = predictions; }
public TeamsController(ITeamsService ts, IPredictionsService ps, IMapper mapper) { this.ts = ts; this.ps = ps; this.mapper = mapper; }
public static void CheckCorrectPredictions(UpdateFinishedGameViewModel model, IPredictionsService predictions, IGamblersService gamblers) { var realFinalResult = model.FinalResult.Split(new char[] { ':', '-' }).ToArray(); var homeTeamGoals = int.Parse(realFinalResult[0]); var guestTeamGoals = int.Parse(realFinalResult[1]); var currentGamePredictions = predictions.GetAll().Where(p => p.GameId == model.Id).ToList(); foreach (var prediction in currentGamePredictions) { currentPredictionPoints = 0; var finalResult = prediction.FinalResult.Split(new char[] { ':', '-' }).ToArray(); var homeTeamGoalsPrediction = int.Parse(finalResult[0]); var guestTeamGoalsPrediction = int.Parse(finalResult[1]); var updatedPrediction = new UpdatePredictionPointsViewModel(); updatedPrediction.FinalResultPredicted = CheckIfResultIsCorrectlyPredicted(homeTeamGoals, guestTeamGoals, homeTeamGoalsPrediction, guestTeamGoalsPrediction); if (!updatedPrediction.FinalResultPredicted) { updatedPrediction.SignPredicted = CheckIfSignIsCorrectlyPredicted(homeTeamGoals, guestTeamGoals, homeTeamGoalsPrediction, guestTeamGoalsPrediction); } else { updatedPrediction.SignPredicted = true; } var goalscorerPredictionPoints = CheckCorrectGoalscorer(model, prediction.Goalscorer); currentPredictionPoints += goalscorerPredictionPoints; if (goalscorerPredictionPoints > 0) { updatedPrediction.GoalscorerPredicted = true; } var currentPrediction = predictions.GetById(prediction.Id).FirstOrDefault(); updatedPrediction.TotalPoints = currentPredictionPoints; var dataModel = AutoMapper.Mapper.Map <UpdatePredictionPointsViewModel, LesGamblers.Models.Prediction>(updatedPrediction); predictions.UpdatePrediction(dataModel, prediction.Id); } }
public MatchesController(IMatchesService matchesService, IPredictionsService predictionsService) { _matchesService = matchesService; _predictionsService = predictionsService; }
public MatchesController(IMatchesService matchesService, IUsersService usersService, IPredictionsService predictionsService) { this.matchesService = matchesService; this.usersService = usersService; this.predictionsService = predictionsService; }