public IActionResult Index(ShapeGeneratorModel model) { if (ModelState.IsValid) { var shape = shapeGenerator.ParseCommand(model.Command); if (shape != null) { model.Shape = shape; } else { ModelState.AddModelError("", "Failed to understand your command"); } } return(View(model)); }
public IActionResult Index() { var model = new ShapeGeneratorModel(); return(View(model)); }