protected override void OnSetUp() { base.OnSetUp(); using (ISession session = OpenSession()) using (ITransaction transaction = session.BeginTransaction()) { var e1 = new Entity { Id = 1, Name = "A" }; session.Save(e1); transaction.Commit(); } }
public void SimpleExpressionWithNewInstance() { var a = new Entity() { Id = 2, Name = "2" }; var restriction = Restrictions.Eq("A", a); Assert.AreEqual(@"A = Entity@" + a.GetHashCode() + "(hash)", restriction.ToString()); }