public async Task <ActionResult <Pertence> > Create([FromBody] Pertence pertence) { if (ModelState.IsValid) { _context.Pertence.Add(pertence); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(pertence); }
public async Task <ActionResult <Curso> > Create([FromBody] Curso curso) { if (ModelState.IsValid) { _context.Add(curso); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(curso); }
public async Task <ActionResult <Professor> > Create([FromBody] Professor professor) { if (ModelState.IsValid) { _context.Add(professor); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(professor); }
public async Task <ActionResult <Disciplina> > Create([FromBody] Disciplina disciplina) { if (ModelState.IsValid) { _context.Add(disciplina); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(disciplina); }
public async Task <ActionResult <Possui> > Create([FromBody] Possui possui) { if (ModelState.IsValid) { _context.Possui.Add(possui); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(possui); }
public async Task <ActionResult <Ofertar_Turma_Disciplina_Sala> > Create([FromBody] Ofertar_Turma_Disciplina_Sala ofertar) { if (ModelState.IsValid) { _context.Ofertar_Turma_Disciplina_Sala.Add(ofertar); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(ofertar); }
public async Task <ActionResult <Lecionar> > Create([FromBody] Lecionar lecionar) { if (ModelState.IsValid) { _context.Lecionar.Add(lecionar); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(lecionar); }