public void VerifyHistoryOfId1() { var ver1 = new DateTestEntity { Id = id1, Date = new DateTime(2000, 1, 2, 3, 4, 5) }; var ver2 = new DateTestEntity { Id = id1, Date = new DateTime(2001, 2, 3, 4, 5, 6) }; Assert.AreEqual(ver1, AuditReader().Find <DateTestEntity>(id1, 1)); Assert.AreEqual(ver2, AuditReader().Find <DateTestEntity>(id1, 2)); }
protected override void Initialize() { var dte = new DateTestEntity { Date = new DateTime(2000, 1, 2, 3, 4, 5) }; using (var tx = Session.BeginTransaction()) { id1 = (int)Session.Save(dte); tx.Commit(); } using (var tx = Session.BeginTransaction()) { dte.Date = new DateTime(2001, 2, 3, 4, 5, 6); tx.Commit(); } }