Exemple #1
0
        public IActionResult Index()
        {
            Dictionary <string, int> surveyCount = surveyDAL.GetSurveyPosts();
            IList <SurveyPark>       surveyParks = new List <SurveyPark>();

            foreach (KeyValuePair <string, int> kvp in surveyCount)
            {
                var        parkCount  = parkDAL.GetPark(kvp.Key);
                SurveyPark surveyList = new SurveyPark();
                surveyList.surveyPark = parkCount;
                surveyList.Count      = kvp.Value;
                surveyParks.Add(surveyList);
            }
            return(View(surveyParks));
        }