public async Task <IActionResult> PutNotasUsuariosAssunto(int id, NotasUsuariosAssunto notasUsuariosAssunto) { if (id != notasUsuariosAssunto.idNotaUsuarioAssunto) { return(BadRequest()); } _context.Entry(notasUsuariosAssunto).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NotasUsuariosAssuntoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <NotasUsuariosAssunto> > CadastraNotasUsuarioAssunto(NotasUsuariosAssunto notasUsuariosAssunto) { _context.NotasUsuariosAssunto.Add(notasUsuariosAssunto); await _context.SaveChangesAsync(); return(CreatedAtAction("GetNotasUsuariosAssunto", new { id = notasUsuariosAssunto.idNotaUsuarioAssunto }, notasUsuariosAssunto)); }