public ActionResult <Hospital> Put(int id, Hospital hospital) { var p = _hospitalRepository.Pesquisar(id); if (p == null) { return(NotFound()); } hospital.HospitalId = id; _hospitalRepository.Atualizar(hospital); _hospitalRepository.Salvar(); return(Ok(hospital)); //Status 200 ok }