public ActionResult Create(PersonalDocument entity) { try { var repo = new DocumentRepository(); repo.Add(entity); return this.RedirectToAction("Index", "Home"); } catch (ArgumentException e) { ViewBag.ErrorMsg = "You have enteres some invalid data! \n" + e.StackTrace; return this.View("Add", entity); } catch (Exception e) { ViewBag.ErrorMsg = "You have enteres some invalid data! \n" + e.StackTrace; return this.View("Add", entity); } }