public async Task <IActionResult> PutBebidas(int id, Bebidas bebidas) { if (id != bebidas.IdBebida) { return(BadRequest()); } _context.Entry(bebidas).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BebidasExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutHistorialConsumo(int id, HistorialConsumo historialConsumo) { if (id != historialConsumo.IdHistorial) { return(BadRequest()); } _context.Entry(historialConsumo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HistorialConsumoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTamanos(int id, Tamanos tamanos) { if (id != tamanos.IdTamano) { return(BadRequest()); } _context.Entry(tamanos).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TamanosExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }