public ActionResult CreateShipper(Shipper ship) { if (ModelState.IsValid) { using (MySqlConnection conn = DBUtils.GetConnection()) { ShipperRepository repo = new ShipperRepository(conn); repo.Save(ship); } return(RedirectToAction("Shippers")); } return(View(ship)); }