public CalendarService(int leagueId)
        {
            using (var dbContext = new LeagueDataContext())
            {
                league = dbContext.Leagues.GetLeagueById(leagueId);

                if (league == null)
                    throw new ServerSideException("Ups, something went wrong! Refresh page and try agine");

                teams = league.Teams.ToArray();
                roundDate = league.Regulations.StartTime;
                isEvenNumberOfTeams = teams.Length.IsEvenNumber();

                SplitTeamsIntoGroups();
            }
        }
        public LeagueTableService(int leagueId)
        {
            using (var dbContext = new LeagueDataContext())
            {
                league = dbContext.Leagues.GetLeagueById(leagueId);

                if (league == null)
                    throw new ServerSideException("Ups, something went wrong! Refresh page and try agine");

                teams = league.Teams;
                tableOrderRules = new List<OrderRules>
                {
                    league.Regulations.TableOrderRules.FifthRule,
                    league.Regulations.TableOrderRules.FourthRule,
                    league.Regulations.TableOrderRules.ThirdRule,
                    league.Regulations.TableOrderRules.SecondRule,
                    league.Regulations.TableOrderRules.FirstRule,
                };
            }
        }