public WebFormModel.FootballFixture GetFootballFixture([RouteData] int fixtureId)
        {
            var fixture = Singleton.Get <RedisCacheManager>()
                          .Get <WebFormModel.FootballFixture>
                          (
                () => RequestLoader.FootballFixtureById(fixtureId),
                RequestLoader.Locker_FootballFixtureById,
                DateTime.Now.AddHours(1),
                RedisKeyMaker.FootballFixtureById(fixtureId)
                          );

            var homefixtures = Singleton.Get <RedisCacheManager>()
                               .Get <IList <WebFormModel.FootballFixture> >
                               (
                () => RequestLoader.FootballFixtureByTeamId(fixture.HomeTeam.TeamId),
                RequestLoader.Locker_FootballFixtureByTeamId,
                DateTime.Now.AddHours(12),
                RedisKeyMaker.FootballFixtureByTeamId(fixture.HomeTeam.TeamId)
                               ).Where(elem => elem.MatchTime < DateTime.Now)
                               .OrderByDescending(elem => elem.MatchTime);

            var awayfixtures = Singleton.Get <RedisCacheManager>()
                               .Get <IList <WebFormModel.FootballFixture> >
                               (
                () => RequestLoader.FootballFixtureByTeamId(fixture.AwayTeam.TeamId),
                RequestLoader.Locker_FootballFixtureByTeamId,
                DateTime.Now.AddHours(12),
                RedisKeyMaker.FootballFixtureByTeamId(fixture.AwayTeam.TeamId)
                               ).Where(elem => elem.MatchTime < DateTime.Now)
                               .OrderByDescending(elem => elem.MatchTime);

            // 홈팀 최근 6경기 득실점
            int fixtureCnt  = 0;
            int goalCnt     = 0;
            int goalAgainst = 0;

            foreach (var selectedfixture in homefixtures)
            {
                if (string.IsNullOrEmpty(selectedfixture.Score.FullTime) ||
                    selectedfixture.LeagueId != fixture.LeagueId)
                {
                    continue;
                }

                // 최근 5경기만..
                if (fixtureCnt >= 6)
                {
                    break;
                }

                bool     isHomeTeam = selectedfixture.HomeTeam.TeamId == fixture.HomeTeam.TeamId;
                string[] scoreSplit = selectedfixture.Score.FullTime.Split('-');

                goalCnt     += int.Parse(scoreSplit[isHomeTeam ? 0 : 1]);
                goalAgainst += int.Parse(scoreSplit[isHomeTeam ? 1 : 0]);

                fixtureCnt++;
            }
            fixture.HomeLateSixGoalPoints = $"{goalCnt} : {goalAgainst}";

            // 홈팀 최근 홈3경기 득실점
            fixtureCnt  = 0;
            goalCnt     = 0;
            goalAgainst = 0;
            foreach (var selectedfixture in homefixtures)
            {
                bool isHomeTeam = selectedfixture.HomeTeam.TeamId == fixture.HomeTeam.TeamId;
                if (string.IsNullOrEmpty(selectedfixture.Score.FullTime) ||
                    selectedfixture.LeagueId != fixture.LeagueId ||
                    !isHomeTeam)
                {
                    continue;
                }

                // 최근 3경기만..
                if (fixtureCnt >= 3)
                {
                    break;
                }

                string[] scoreSplit = selectedfixture.Score.FullTime.Split('-');

                goalCnt     += int.Parse(scoreSplit[0]);
                goalAgainst += int.Parse(scoreSplit[1]);

                fixtureCnt++;
            }
            fixture.HomeLateThreeGoalPoints = $"{goalCnt} : {goalAgainst}";

            // 어웨이팀 최근 6경기 득실점
            fixtureCnt  = 0;
            goalCnt     = 0;
            goalAgainst = 0;
            foreach (var selectedfixture in awayfixtures)
            {
                if (string.IsNullOrEmpty(selectedfixture.Score.FullTime) ||
                    selectedfixture.LeagueId != fixture.LeagueId)
                {
                    continue;
                }

                // 최근 6경기만..
                if (fixtureCnt >= 6)
                {
                    break;
                }

                bool     isHomeTeam = selectedfixture.HomeTeam.TeamId == fixture.AwayTeam.TeamId;
                string[] scoreSplit = selectedfixture.Score.FullTime.Split('-');

                goalCnt     += int.Parse(scoreSplit[isHomeTeam ? 0 : 1]);
                goalAgainst += int.Parse(scoreSplit[isHomeTeam ? 1 : 0]);

                fixtureCnt++;
            }
            fixture.AwayLateSixGoalPoints = $"{goalCnt} : {goalAgainst}";

            // 어웨이팀 최근 어웨이3경기 득실점
            fixtureCnt  = 0;
            goalCnt     = 0;
            goalAgainst = 0;
            foreach (var selectedfixture in awayfixtures)
            {
                bool isAwayTeam = selectedfixture.AwayTeam.TeamId == fixture.AwayTeam.TeamId;
                if (string.IsNullOrEmpty(selectedfixture.Score.FullTime) ||
                    selectedfixture.LeagueId != fixture.LeagueId ||
                    !isAwayTeam)
                {
                    continue;
                }

                // 최근 3경기만..
                if (fixtureCnt >= 3)
                {
                    break;
                }

                string[] scoreSplit = selectedfixture.Score.FullTime.Split('-');

                goalCnt     += int.Parse(scoreSplit[1]);
                goalAgainst += int.Parse(scoreSplit[0]);

                fixtureCnt++;
            }
            fixture.AwayLateThreeGoalPoints = $"{goalCnt} : {goalAgainst}";

            // 홈팀 회복기간
            var homeLastFixtures = homefixtures.FirstOrDefault();

            if (homeLastFixtures != null)
            {
                fixture.HomeRecoveryDays = $"{(fixture.MatchTime - homeLastFixtures.MatchTime).Days}일";
            }

            // 원정팀 회복기간
            var awayLastFixtures = awayfixtures.FirstOrDefault();

            if (awayLastFixtures != null)
            {
                fixture.AwayRecoveryDays = $"{(fixture.MatchTime - awayLastFixtures.MatchTime).Days}일";
            }

            return(fixture);
        }
        private void BindData(params int[] searchTeamIDs)
        {
            // view1
            if (searchTeamIDs.Length > 0)
            {
                var homefixtures = Singleton.Get <RedisCacheManager>()
                                   .Get <IList <WebFormModel.FootballFixture> >
                                   (
                    () => RequestLoader.FootballFixtureByTeamId(_searchTeamIDs[0]),
                    RequestLoader.Locker_FootballFixtureByTeamId,
                    DateTime.Now.AddHours(12),
                    RedisKeyMaker.FootballFixtureByTeamId(_searchTeamIDs[0])
                                   );

                // 지난 경기
                var homeLateFixtures = homefixtures.Where(elem => elem.MatchTime < DateTime.Now)
                                       .OrderByDescending(elem => elem.MatchTime)
                                       .Take(20);

                if (homeLateFixtures?.Count() > 0)
                {
                    gv_homeLateFixtures.DataSource = homeLateFixtures;
                    gv_homeLateFixtures.DataBind();
                }

                // 예정된 경기
                var homeReserveFixtures = homefixtures.Where(elem => elem.MatchTime > DateTime.Now)
                                          .Take(10);
                if (homeReserveFixtures?.Count() > 0)
                {
                    gv_homeReserveFixtures.DataSource = homeReserveFixtures;
                    gv_homeReserveFixtures.DataBind();
                }
            }

            //view2
            if (searchTeamIDs.Length > 1)
            {
                var awayfixtures = Singleton.Get <RedisCacheManager>()
                                   .Get <IList <WebFormModel.FootballFixture> >
                                   (
                    () => RequestLoader.FootballFixtureByTeamId(_searchTeamIDs[1]),
                    RequestLoader.Locker_FootballFixtureByTeamId,
                    DateTime.Now.AddHours(12),
                    RedisKeyMaker.FootballFixtureByTeamId(_searchTeamIDs[1])
                                   );

                // 지난 경기
                var awayLateFixtures = awayfixtures.Where(elem => elem.MatchTime < DateTime.Now)
                                       .OrderByDescending(elem => elem.MatchTime)
                                       .Take(20);

                if (awayLateFixtures?.Count() > 0)
                {
                    gv_awayLateFixtures.DataSource = awayLateFixtures;
                    gv_awayLateFixtures.DataBind();
                }

                // 예정된 경기
                var awayReserveFixtures = awayfixtures.Where(elem => elem.MatchTime > DateTime.Now)
                                          .Take(10);
                if (awayReserveFixtures?.Count() > 0)
                {
                    gv_awayReserveFixtures.DataSource = awayReserveFixtures;
                    gv_awayReserveFixtures.DataBind();
                }
            }
        }