Пример #1
0
 public void AddGate(AddGate p)
 {
     string cmd = string.Format("INSERT INTO gate (gatename) values('{0}')",
             p.Name);
     MySqlConnection conn = new MySqlConnection(System.Configuration.ConfigurationManager.AppSettings["ConnectionString"]);
     conn.Open();
     MySqlCommand command = new MySqlCommand(cmd, conn);
     command.ExecuteReader();
     conn.Close();
 }
Пример #2
0
 public ActionResult AddGate(AddGate gate)
 {
     gateRepo.AddGate(gate);
     return RedirectToAction("Index", "Gate");
 }