public ActionResult Create(BlogPost model) { try { if (ModelState.IsValid) { _repo.Create(model); return(RedirectToAction("Index")); } } catch (Exception e) { throw new Exception(e.Message); } return(View(model)); }