public async Task <IActionResult> PutProprietario(int id, Proprietario proprietario) { if (id != proprietario.Id) { return(BadRequest()); } _context.Entry(proprietario).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProprietarioExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutImovel(int id, Imovel imovel) { if (id != imovel.Id) { return(BadRequest()); } _context.Entry(imovel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ImovelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }