public IActionResult Scan(string url, int depth) { ViewBag.Results = ScanHelper.GetResultFromUrlWithDepth(url, depth); var pages = ScanHelper.GetSavedPages(); foreach (var page in pages) { _context.Add(page); } _context.SaveChanges(); return(View()); }