public void SaveNewObject_SavesObject() { using (var session = _documentStore.OpenSession()) { var set = new RavenObjectSet<TestClass>(session); set.AddObject(new TestClass() { FirstName = "Donald", LastName = "Duck" }); session.SaveChanges(); } using (var session = _documentStore.OpenSession()) { TestClass duck = (from tc in session.Query<TestClass>() where tc.FirstName == "Donald" select tc).FirstOrDefault(); Assert.That(duck, Is.Not.Null); } }
public void SaveNewObject_SavesObject() { using (var session = _documentStore.OpenSession()) { var set = new RavenObjectSet <TestClass>(session); set.AddObject(new TestClass() { FirstName = "Donald", LastName = "Duck" }); session.SaveChanges(); } using (var session = _documentStore.OpenSession()) { TestClass duck = (from tc in session.Query <TestClass>() where tc.FirstName == "Donald" select tc).FirstOrDefault(); Assert.That(duck, Is.Not.Null); } }