public async Task <IActionResult> PutFatura(int id, Fatura fatura) { if (id != fatura.FaturaId) { return(BadRequest()); } _context.Entry(fatura).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FaturaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEmpregado(int id, Empregado empregado) { if (id != empregado.EmpregadoId) { return(BadRequest()); } _context.Entry(empregado).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmpregadoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }