public ActionResult NewMoneyEntry(float?change, string note) { bool res; using (DBAgent.DBAgent agent = new DBAgent.DBAgent()) { res = agent.NewMoneyEntry(change, note); } if (res) { return(Redirect("/Home/Money")); } else { return(View("~/Views/Shared/Error.cshtml")); } }