Esempio n. 1
0
 public ActionResult Delete([FromBody] Models.Solicitudes.EditMateria materia)
 {
     using (Models.ColegioContext bd = new Models.ColegioContext())
     {
         Models.Materias materiaa = bd.Materias.Find(materia.Idmaterias);
         bd.Remove(materiaa);
         bd.SaveChanges();
     }
     return(Ok());
 }
Esempio n. 2
0
 public ActionResult Delete([FromBody] Models.Solicitudes.EditCurso curso)
 {
     using (Models.ColegioContext bd = new Models.ColegioContext())
     {
         Models.Curso cursoo = bd.Curso.Find(curso.Idcurso);
         bd.Remove(cursoo);
         bd.SaveChanges();
     }
     return(Ok());
 }
Esempio n. 3
0
        public ActionResult Delete([FromBody] Models.Solicitudes.EditAlumno alumno)
        {
            using (Models.ColegioContext bd = new Models.ColegioContext())
            {
                Models.Alumno alumnoo = bd.Alumno.Find(alumno.Idalumno);

                bd.Remove(alumnoo);
                bd.SaveChanges();
            }
            return(Ok());
        }