예제 #1
0
        public RandomNumber(NewRandomNumbersViewModel newRandomNumbers)
        {
            Ascending = newRandomNumbers.IsAscending();
            Stopwatch stopwatch = Stopwatch.StartNew();

            SortedNumbers = SortNumbers(newRandomNumbers.UnsortedNumbers);

            //int will be large enough for this.
            Millis = (int)stopwatch.ElapsedMilliseconds;
        }
예제 #2
0
 public ActionResult Create(NewRandomNumbersViewModel viewModel)
 {
     _context.RandomNumbers.Add(new RandomNumber(viewModel));
     _context.SaveChanges();
     return(RedirectToAction("Index", "RandomNumbers"));
 }