Пример #1
0
        public void SessionsAreDifferent()
        {
            using (new SessionScope())
            {
                var blog = new Blog();
                var author = new Author();

                AR.FindAll<Blog>();
                AR.FindAll<Author>();

                Assert.AreNotSame(blog.GetCurrentSession(), author.GetCurrentSession());
                Assert.AreNotEqual(
                    blog.GetCurrentSession().Connection.ConnectionString,
                    author.GetCurrentSession().Connection.ConnectionString);
            }
        }
Пример #2
0
 private static void CreateAuthor()
 {
     var author = new Author {Name = "Dr. Who"};
     AR.Save(author);
 }