예제 #1
0
 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));
 }
예제 #2
0
        public ActionResult NextPrime()
        {
            var model = new PrimeSearchTool();

            return(View(model));
        }