public async Task <IActionResult> PutZona([FromRoute] int id, [FromBody] Zona zona) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != zona.IdZona) { return(BadRequest()); } _context.Entry(zona).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZonaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSlotParqueadero([FromRoute] int id, [FromBody] SlotParqueadero slotParqueadero) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != slotParqueadero.IdSlotParqueadero) { return(BadRequest()); } _context.Entry(slotParqueadero).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SlotParqueaderoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }