public ActionResult NextPrime(PrimeSearchTool number) { if (ModelState.IsValid) { var primeFinder = new PrimeFinder(); var primer = new Primer(); primer.StartNumber = number.FirstNumber.Value; primer = primeFinder.FindPrime(primer); number.NextPrime = primer.PrimeNumber; return(View("NextPrime", number)); } return(View("NextPrime", number)); }
public ActionResult NextPrime() { var model = new PrimeSearchTool(); return(View(model)); }