public async Task <IActionResult> PutRestaurante(int id, Restaurante restaurante) { if (id != restaurante.Id) { return(BadRequest()); } _context.Entry(restaurante).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RestauranteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMKV(string id, MKV mKV) { if (id != mKV.Key) { return(BadRequest()); } _context.Entry(mKV).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MKVExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }