public ActionResult FibonacciSequenceForm(FibonacciValidation model) { if (ModelState.IsValid) { var calc = new FibonacciSequenceOperations(); var request = new FibonacciSequence(); request.Term = model.Term.Value; var result = calc.CalculateSequence(request.Term); return View("FibonacciSequenceResult", result); } return View(model); }
public ActionResult FibonacciSequenceForm() { var model = new FibonacciValidation(); return View(model); }