public async Task <IActionResult> Index(string CountryCode, int Year) //Controller Action method for creating Holidaymodel list { List <HolidayModel> holidays = new List <HolidayModel>(); if (!string.IsNullOrEmpty(CountryCode) && Year > 0) { holidays = await _holidayservice.GetPublicHolidays(CountryCode, Year); //storing result from GetPublicHolidays to list variable } return(View(holidays)); //returning list to Index Razor view }