I am trying to understand the implications of using fluent nHibernate, and what types of SQL queries it produces, just having started using nHibernate.

I have a query instance that looks like the following.

var contact = session.Query<Contact>().Where(ix => ix.Id == id).First();

My above Id field is a Guid.

My intuition tells me that Fluent nHibernate will behind the scene produce an SQL that looks like the following "select * from contact where Id = @id", however since I don't want to select my entire table, for then to apply the Linq query, I'd like to have my assumptions verified.

How does the Query class work, and where can I find great online resources about this? (and preferably easily digested information)

Your Answer


Browse other questions tagged or ask your own question.