public async Task <IActionResult> PutCarros(int id, Carros carros) { if (id != carros.Id) { return(BadRequest()); } _context.Entry(carros).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CarrosExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }