我试图让NEventStore (v4)在嵌入式模式下使用RavenDB。
我的连接字符串如下所示:
<add name="EventStore" connectionString="DataDir = ~\Data" />在Application_Start中,我像这样建立了乌鸦商店:
var documentStore = new EmbeddableDocumentStore
{
ConnectionStringName = "EventStore"
};
documentStore.Initialize();这将在初始化任何事件存储代码之前运行。此时,我可以使用Raven保存文档。雷文在工作。
对于NEventStore,init如下所示:
_store = Wireup.Init()
.LogToOutputWindow()
.UsingRavenPersistence("EventStore")
.InitializeStorageEngine()
.UsingJsonSerialization()
.Compress()
.UsingSynchronousDispatchScheduler()
.DispatchTo(new DelegateMessageDispatcher(DispatchCommit))
.Build();当它运行时,我会得到以下错误:
连接字符串名称:“EventStore”无法解析,未知选项:“datadir”
在查看(RavenDB)源代码时,连接字符串解析器似乎不知道它正在读取嵌入式连接字符串。但是,我看不出有任何方法表明NEventStore是在嵌入式模式下使用Raven。
发布于 2014-11-17 17:22:36
选项'DataDir‘只适用于EmbeddableDocumentStore。NEventstore 创建 a DocumentStore.据我所知你不能改变这种行为。
您可以做的是使用RavenDB启动嵌入式HTTP启用并连接到本地主机。
https://stackoverflow.com/questions/23326260
复制相似问题