public async Task <ActionResult <Materia> > CreateEstudent([FromBody] Materia materia)
        {
            _dbContext.Materias.Add(materia);
            await _dbContext.SaveChangesAsync();

            return(StatusCode(201, materia));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <Profesor> > CreateEstudent([FromBody] Profesor profesor)
        {
            _dbContext.Profesores.Add(profesor);
            await _dbContext.SaveChangesAsync();

            return(StatusCode(201, profesor));
        }
        public async Task <ActionResult <Estudiante> > CreateEstudent([FromBody] Estudiante estudiante)
        {
            _dbContext.Estudiantes.Add(estudiante);
            await _dbContext.SaveChangesAsync();

            return(StatusCode(201, estudiante));
        }