public async Task <IActionResult> PutAspNetUsers(string id, AspNetUsers aspNetUsers) { if (id != aspNetUsers.Id) { return(BadRequest()); } _context.Entry(aspNetUsers).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AspNetUsersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDepartamento(int id, Departamento departamento) { if (id != departamento.DepartamentoId) { return(BadRequest()); } _context.Entry(departamento).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DepartamentoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }