public async Task <IActionResult> PutUsuarios(int id, Usuarios usuarios) { if (id != usuarios.Id) { return(BadRequest()); } _context.Entry(usuarios).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UsuariosExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProductos(int id, Productos productos) { if (id != productos.Id) { return(BadRequest()); } _context.Entry(productos).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductosExists(id)) { return(NotFound()); } else { throw; } } return(CreatedAtAction("GetProductos", new { id = productos.Id }, productos)); }