title: Problems with returning json
body: <p>I have a function in <code>json</code> and in this function I call a controller passing a parameter of type string. And in this function I enter into the database and retrieve the desired information, so that´s okay. However my result doesn't show in this view. Returning an error and not the information wanted. Can someone help me?</p>
  
  <p><strong>My code</strong></p>
  
  <pre><code>$('#btnPesquisarPaciente').click(function () {
      var nomePesquisado = $('#txtNomePaciente').val();
      if (nomePesquisado != '') {
          $.ajax({
              type: 'GET',
              url: "pacientes/recuperaPacientePorNome",
              data: { nomePaciente: nomePesquisado },
              success: function (data) {
                  // console.log('nome encontrado' + data.NOME);
                  $('#lblPaciente').text = 'fa';
                  //var pacienteEncontrado = $('lblPaciente').html();
                  //pacienteEncontrado.append($('&lt;p/&gt;').html('&lt;b&gt;' + paciente.NOME + '&lt;/b&gt;'));
              },
              error: function () {
                  alert('NÃO FOI POSSÍVEL ENCONTRAR ESTE PACIENTE');
              }
          })
      } else {
          alert('INFORME O NOME DO PACIENTE DESEJADO');
      }
  })
  </code></pre>
  
  <p><strong>My controller</strong></p>
  
  <pre><code>public JsonResult recuperaPacientePorNome(string nomePaciente) {
      paciente p = null;
      if (!string.IsNullOrEmpty(nomePaciente)) {
          using(db=new crm_webEntities()) {
             p = (from x in db.paciente where x.NOME.ToUpper().StartsWith(nomePaciente.ToUpper()) select x).FirstOrDefault();
          }
      }
      return Json(p, JsonRequestBehavior.AllowGet);
  }
  </code></pre>