public ActionResult Delete(string id, Brewery brewery) { try { var result = mongoService.DeleteBrewery(id); if (result.DeletedCount > 0) { return(RedirectToAction("Index")); } else { TempData["Error"] = "Something went wrong, failed to delete."; return(View()); } } catch { return(View()); } }