Exemplo n.º 1
0
        public IActionResult IndexEnum(CountryEnumViewModel model)
        {
            if (ModelState.IsValid)
            {
                var msg = model.EnumCountry + " selected";
                return RedirectToAction("IndexSuccess", new { message = msg});
            }

            return View(model);
        }
Exemplo n.º 2
0
 public IActionResult IndexEnum()
 {
     var model = new CountryEnumViewModel();
     model.EnumCountry = CountryEnum.Spain;
     return View(model);
 }