tiva, as I wrote, the behavior you need is indeed possible with NH currently and you are confused about the reason for the existence of SQLQuery. I'll leave disabuse to the latter to your own study. To illustrate the former more specifically, here's how to do what you want in pseudocode:
Code:
using ( ISession sess = factory.OpenSession() )
using ( ITransaction tx = sess.BeginTransaction() ) {
// do some NH CRUD...
// perform bulk delete in the same transaction!
IDbCommand deletecommand = sess.Connection.CreateCommand();
deletecommand.CommandText = "...";
// other command formatting
tx.Enlist( deletecommand );
deletecommand.ExecuteNonQuery();
//do some more NH or bulk stuff
.
.
.
// oops!?
if ( oops ) {
tx.Rollback();
return;
}
// done!
tx.Commit();
}