public IActionResult Index(Models.BasicValidationModel model) { if (!ModelState.IsValid) { ModelState.AddModelError("", "There was an error validating the model state."); } return(View(model)); }
public IActionResult Index() { var model = new Models.BasicValidationModel(); return(View(model)); }