public void CanQueryAll()
        {
            var e = QueryFor <PersonCs> .For(
                connection,
                "select data from PersonCs");

            Assert.NotNull(e);
        }
        private void TheDocumentWasInserted()
        {
            var e = QueryFor <PersonCs> .For(
                connection,
                "select data from PersonCs where Data.value('(/FsPickler/value/instance/idkBackingField)[1]', 'uniqueidentifier') = @id",
                new Dictionary <string, object> {
                { "id", _ernesto._id }
            });

            Assert.Equal(1, e.Length);
            Assert.Equal("Ernesto", e.First().Name);
        }
        public void All()
        {
            var test1 = new TestClass();
            var test2 = new TestClass();

            using (var tx = Session.BeginTransaction())
            {
                Session.Save(test1);
                Session.Save(test2);
                tx.Commit();
            }
            Session.Flush();
            Session.Clear();

            using (Session.BeginTransaction())
            {
                ILinqProvider linqProvider = new StubLinqProvider(Session);
                IQueryFactory queryFactory = new QueryFactoryStub(linqProvider);

                var result = new QueryFor <IQueryable <TestClass> >(queryFactory).All();

                Assert.AreEqual(2, result.Count());
            }
        }