public void UpdateGate(UpdateGate m) { string cmd = string.Format("UPDATE gate set gatename='{0}' where id='{1}'", m.Name, m.Id); MySqlConnection conn = new MySqlConnection(System.Configuration.ConfigurationManager.AppSettings["ConnectionString"]); conn.Open(); MySqlCommand command = new MySqlCommand(cmd, conn); command.ExecuteReader(); conn.Close(); }
public ActionResult UpdateGate(UpdateGate gate) { gateRepo.UpdateGate(gate); return RedirectToAction("Index", "Gate"); }