public IActionResult Delete(int id) { if (id == null) { return(NotFound()); } var result = _mongo.Delete(id); if (result == true) { return(RedirectToAction("Index")); } else { return(NotFound()); } }