private void ProcessMatch(Match match, ClassificationTable globalClassification, ClassificationTable minileague3, ClassificationTable minileague5, ClassificationTable minileague10) { Console.WriteLine(match.MatchDay); string homeTeamName = match.HomeTeam.Name; string awayteamName = match.AwayTeam.Name; string result = (match.HomeTeamGoals > match.AwayTeamGoals) ? HOME_WIN : (match.HomeTeamGoals < match.AwayTeamGoals) ? AWAY_WIN : TIE; var gh = globalClassification.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(homeTeamName)).Single(); var l3h = minileague3.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(homeTeamName)).Single(); var l5h = minileague5.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(homeTeamName)).Single(); var l10h = minileague10.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(homeTeamName)).Single(); var ga = globalClassification.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(awayteamName)).Single(); var l3a = minileague3.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(awayteamName)).Single(); var l5a = minileague5.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(awayteamName)).Single(); var l10a = minileague10.History.Where(h => h.MatchDay == match.MatchDay - 1 && h.GlobalAccumulator.Team.Name.Equals(awayteamName)).Single(); FeatureMatrixItem x = new FeatureMatrixItem(CurrentSeason, CurrentDivision, gh, l3h, l5h, l10h, ga, l3a, l5a, l10a, result); FeatureMatrix.Add(x); }