public bool VerificarPacientes(string numexpediente) {
try {
bool found;
//long numexp = Int64.Parse(numexpediente);
long numexp = Convert.ToInt64(numexpediente);
int x = 0;
var query = (from p in entities.pacientes
where p.expediente == numexp
select p.nombres);
int x2 = 0;
if (!query.Any())
{
found = false;
}
else {
found = true;
}
return found;
}catch(Exception ex){
throw new Exception(ex.ToString());
}
}