public ActionResult AddSave(string name, string number) { try { // TODO: Add insert logic here Record record = new Record(random.Next(), name, number); recordRepository.AddRecord(record); return(RedirectToAction("Index")); } catch { return(View()); } }