Esempio n. 1
0
        static IDocumentStore CreateDocumentStore()
        {
            var path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;

            path = Path.Combine(path, Conventions.RavenDataDirectory);
            var populate = !Directory.Exists(path);

            var documentStore = new EmbeddableDocumentStore()
            {
                DataDirectory = path
            }.Initialize();

            if (populate)
            {
                documentStore.PopulateAll();
            }

            //documentStore.DatabaseCommands.EnsureDatabaseExists (Conventions.RavenDatabase);

            return(documentStore);
        }