private static void InsertObject(IDocumentStore store, Location location) { using (var session = store.OpenSession()) { session.Store(location); session.SaveChanges(); } }
public void TestRaven() { var store = new EmbeddableDocumentStore {RunInMemory = true}; store.Initialize(); var location = new Location { Description = "some location", Id = "1", Latitude = 20, Longitude = 40, Name = "Ktulhu" }; InsertObject(store, location); var result = GetObject(store); Assert.Equal(location, result); }