public ActionResult Create(CustomerModel data) { Boolean result = false; try { result = objBusiness.AddNewCustomer(data); if (result) { ViewBag.Result = "SUCCESS: " + data.Name + " added successfully."; } else { ViewBag.Error = "Failure: Something went wrong."; } } catch (Exception ex) { throw ex; } return(View()); }