public bool UpdateEntry(RegisterEntry entry)
 {
     int index = _entries.FindIndex(e => e.Email == entry.Email);
     _entries.RemoveAt(index);
     _entries.Add(entry);
     return true;
 }
 public ActionResult Edit(RegisterEntry entry)
 {
     _repository.UpdateEntry(entry);
     return RedirectToAction("viewData");
 }