Esempio n. 1
0
        public List <SelectListItem> GetCountryList()
        {
            List <SelectListItem> lstCountryList = new List <SelectListItem>();
            var data = _countryWebTask.GetCountryList();

            lstCountryList = data.Select(x => new SelectListItem
            {
                Text  = x.CountryName,
                Value = x.CountryId.ToString(),
            }).ToList();

            return(lstCountryList);
        }
Esempio n. 2
0
        // GET: Cource
        public ActionResult Index()
        {
            var countryList = _countryWebTask.GetCountryList();

            return(View(countryList));
        }