It's not much. But it does work. Don't get too excited (again - I keep saying that!), but this is now going right through the execution pipeline within NH, so this did hit the DB, and did come back with the correct answer. Of course, there aren't any Assert()s or any fancy stuff like that. It's not *really* a test :).
Now just to do the translation properly... And write some real tests...
[Test]
public void Test()
{
ISession session = OpenSession();
var x = from a in session.Query<Animal>() where a.Legs == 8 select a;
Console.WriteLine(x.ToList().Count());
session.Close();
}
BTW, ignore the superfluous .ToList() in there, it's just 'cos my translator doesn't know how to handle Count(), so I'm forcing execution and doing the Count() client-side.