public void Create(Disciplinas pDisciplina)
        {
            string sql = "insert into disciplinas values (";
            sql += pDisciplina.Id + ",'" + pDisciplina.Nome + "')";

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

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

            return DisciplinasEditar;
        }
 public void Update(Disciplinas pDisciplina)
 {
     string sql = "update disciplinas set nome ='" + pDisciplina.Nome + "' where id =" + pDisciplina.Id;
     conn.executarComando(sql);
 }
 public ActionResult UpdateDisciplina(Disciplinas aDisciplina)
 {
     disciplinaRepositorio.Update(aDisciplina);
     return RedirectToAction("Disciplina");
 }