public IActionResult Get(int id) { ServiceResponse <Hasta> response = new ServiceResponse <Hasta>(); Hasta entity = service.GetByID(id); if (entity == null) { response.Errors.Add("Hasta bulunamadı"); response.HasError = true; return(BadRequest(response)); } else { response.entity = entity; response.IsSuccessful = true; return(Ok(response)); } }