using Raven.Client.Documents;
using System;
namespace ERPAdminUI.Data
{
public class DocumentStoreHolder
{
//private static readonly Lazy<IDocumentStore> _store =new Lazy<IDocumentStore>(CreateDocumentStore);
private static Lazy<IDocumentStore> store = new Lazy<IDocumentStore>(CreateDocumentStore);
public static IDocumentStore Store => store.Value;
private static IDocumentStore CreateDocumentStore()
{
//string conexaoRavenDb = System.Configuration.ConfigurationManager.AppSettings["conexaoRavenDb"];
var documentStore = new DocumentStore
{
Conventions = { },
Urls = new[] // urls of the nodes in the RavenDB Cluster
{
"http://127.0.0.1:38888"
},
Database = "CATRONISCrm",
}.Initialize();
//documentStore.Initialize();
return documentStore;
}
}
}
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/f4ad1d5f-0da0-4278-aa57-1253fb264aab%40googlegroups.com.
![]() | Arkadiusz Paliński Team Leader / Hibernating Rhinos LTD
|
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/CAEUAT1isdL8EDRukvDWVQrm_%3DpHksULtV9KShab8mSurfmK3HA%40mail.gmail.com.
![]() | Oren Eini CEO / Hibernating Rhinos LTD
|