Ejemplo n.º 1
0
        public void StoresAndRetrievesByFieldName()
        {
            var d = new AlternateDocument { AlternateName = "My Document", Key = "0" };
            using (var session = provider.OpenSession<AlternateDocument>())
            {
                session.Add(d);
                session.Commit();
            }

            var documents = provider.AsQueryable<SampleDocument>();

            var result = from doc in documents select doc;

            Assert.That(result.FirstOrDefault().Name, Is.EqualTo(d.AlternateName));
        }
Ejemplo n.º 2
0
        public void StoresAndRetrievesByFieldName()
        {
            var d = new AlternateDocument {
                AlternateName = "My Document"
            };

            using (var session = provider.OpenSession <AlternateDocument>())
            {
                session.Add(d);
                session.Commit();
            }

            var documents = provider.AsQueryable <SampleDocument>();

            var result = from doc in documents select doc;

            Assert.That(result.FirstOrDefault().Name, Is.EqualTo(d.AlternateName));
        }