Conditional Sql parameters with nHibernate
The problem is a the nHibernate’s `CreateSqlQuery` needs a complete sql string to be created, but you can’t create a string until you’ve evaluated the parameters. The only work around is to evaluate the conditional parameters to create the sql string to create the nHibernate session and then revaluate the parameters again to add them to the `nHibernate` query object.