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); } }
private static void CreateAuthor() { var author = new Author {Name = "Dr. Who"}; AR.Save(author); }