Example #1
0
        public async Task <IActionResult> PutAssuntos(int id, Assuntos assuntos)
        {
            if (id != assuntos.idAssunto)
            {
                return(BadRequest());
            }

            _context.Entry(assuntos).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AssuntosExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        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());
        }