using (var documentStore = new EmbeddableDocumentStore{DataDirectory = "Data"}.Initialize()) { // now we can use the embedded instance using (var session = documentStore.OpenSession()) { // do work with the session } }