/// <summary>
        /// Construct the data model based on the entries in the CSV file
        /// </summary>
        /// <param name="fileContent"></param>
        /// <returns></returns>

        public ScoresListModel GetPointsTable(string fileContent)
        {
            int             rowIndex        = 0;
            ScoresListModel FinalscoresList = new ScoresListModel();

            foreach (string row in fileContent.Split('\n'))
            {
                if (!string.IsNullOrEmpty(row))
                {
                    ScoreModel scoreBoard   = new ScoreModel();
                    string[]   columnValues = row.Split(',');

                    if (rowIndex == 0)
                    {
                        ValidateColumn(columnValues);
                    }
                    else
                    {
                        AssignColumnValues(columnValues, ref scoreBoard);
                        FinalscoresList.ScoreList.Add(scoreBoard);
                    }

                    rowIndex++; //Increment the row count
                }
            }

            return(FinalscoresList);
        }
        private static void ReadCSVFile()
        {
            //Read the contents of CSV file.
            string          csvData         = File.ReadAllText(filePath);
            ScoresListModel FinalscoresList = new ScoresListModel();
            bool            HeaderRow       = false;
            int             rowIndex        = 0;

            //Execute a loop over the rows.
            foreach (string row in csvData.Split('\n'))
            {
                if (!string.IsNullOrEmpty(row))
                {
                    ScoreModel scoreBoard   = new ScoreModel();
                    string[]   columnValues = row.Split(',');

                    if (rowIndex == 0)
                    {
                        ValidateColumn(columnValues);
                    }
                    else
                    {
                        AssignColumnValues(columnValues, ref scoreBoard);
                        FinalscoresList.ScoreList.Add(scoreBoard);
                    }

                    rowIndex++; //Increment the row count
                }
            }
            var GoalDiffference = FinalscoresList.ScoreList
                                  .Select(t => new
            {
                Team           = t.TeamName,
                GoalDifference = t.GoalsFor - t.GoalsAgainst
            }).OrderBy(t => t.GoalDifference).First();

            Console.WriteLine("Team" + GoalDiffference.Team + "difference" + GoalDiffference.GoalDifference);
            Console.ReadLine();
        }
        public string TeamWithSmallestGoalDifferecence(string fileContent)
        {
            int             rowIndex        = 0;
            ScoresListModel FinalscoresList = new ScoresListModel();

            foreach (string row in fileContent.Split('\n'))
            {
                if (!string.IsNullOrEmpty(row))
                {
                    ScoreModel scoreBoard   = new ScoreModel();
                    string[]   columnValues = row.Split(',');

                    if (rowIndex == 0)
                    {
                        ValidateColumn(columnValues);
                    }
                    else
                    {
                        AssignColumnValues(columnValues, ref scoreBoard);
                        FinalscoresList.ScoreList.Add(scoreBoard);
                    }

                    rowIndex++; //Increment the row count
                }
            }
            var GoalDiffference = FinalscoresList.ScoreList
                                  .Select(t => new
            {
                Team           = t.TeamName,
                GoalDifference = t.GoalsFor - t.GoalsAgainst
            }).OrderBy(t => t.GoalDifference)
                                  .Where(team => team.GoalDifference > 0)
                                  .First();

            return(GoalDiffference.Team);
        }