尝试在事务上设置IsolationLevel.这个片段对我有用:
using (var trans = _session.BeginTransaction(IsolationLevel.ReadUncommitted)) { new PersistenceSpecification(_session) .CheckProperty(p => p.StartTime, new DateTime(2010, 1, 1)) .VerifyTheMappings(); trans.Rollback(); }