Use the ExecuteUpdate method. The code below will perform bulk removal of packages. This works in NHibernate 2.1.0. (Not sure about previous versions)
foreach (List<int> batch in GetBatches(records, _batchSize))
{
using (ITransaction transaction = _session.BeginTransaction())
{
_session.CreateQuery(String.Format("DELETE FROM {0} WHERE Id IN (:idsList)", _domainObject.Name))
.SetParameterList("idsList", batch.ToArray())
.ExecuteUpdate();
transaction.Commit();
}
}
source
share