public ActionResult Index() { var ViewModel = new HomeViewModel() { ResultNumber = 0 }; return View(ViewModel); }
public ActionResult Index(HomeViewModel ViewModel) { var Index = ViewModel.IndexNumber; var Result = _fibonacciNumber.GetFibonacciNumbersByIndex(Index); HomeViewModel NewViewModel = new HomeViewModel() { ResultNumber = Result, IndexNumber = Index }; return View(NewViewModel); }