public async Task <ActionResult <MateriaTurma> > PostMateriaTurma(MateriaTurma materiaTurma) { _context.MateriaTurma.Add(materiaTurma); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMateriaTurma", new { id = materiaTurma.Id }, materiaTurma)); }
public async Task <IActionResult> PutMateriaTurma(MateriaTurma materiaTurma) { _context.Entry(materiaTurma).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException ex) { if (!MateriaTurmaExists(materiaTurma.Id)) { return(NotFound()); } else { throw; } } return(NoContent()); }