public void Create(Disciplina pDisciplina)
        {
            string sql = "insert into disciplinas values (";
            sql += pDisciplina.id + ",'" + pDisciplina.nome + "')";

            conn.executarComando(sql);
        }
        public Disciplina GetOne(int pId)
        {
            string sql = "select * from disciplinas where id =" + pId;
            MySqlDataReader dr = conn.executarConsulta(sql);

            dr.Read();
            Disciplina dipEditando = new Disciplina((int)dr["id"], (string)dr["nome"]);

            return dipEditando;
        }
 public ActionResult Update(Disciplina pDisciplina)
 {
     //discRep.Update(pDisciplina);
     return RedirectToAction("index");
 }
 public ActionResult Create(Disciplina pDisciplina)
 {
     discRep.Create(pDisciplina);
     return RedirectToAction("index");
 }