【发布时间】:2014-04-27 16:57:15
【问题描述】:
我正在尝试让 NEventStore (v4) 在嵌入式模式下与 RavenDB 一起使用。
我的连接字符串如下所示:
<add name="EventStore" connectionString="DataDir = ~\Data" />
在 Application_Start 中,我这样设置 Raven Store:
var documentStore = new EmbeddableDocumentStore
{
ConnectionStringName = "EventStore"
};
documentStore.Initialize();
这在初始化任何事件存储代码之前运行。此时我可以使用 Raven 来保存文档。所以 Raven 正在工作。
对于 NEventStore,init 看起来像这样:
_store = Wireup.Init()
.LogToOutputWindow()
.UsingRavenPersistence("EventStore")
.InitializeStorageEngine()
.UsingJsonSerialization()
.Compress()
.UsingSynchronousDispatchScheduler()
.DispatchTo(new DelegateMessageDispatcher(DispatchCommit))
.Build();
当它运行时,我得到这个错误:
连接字符串名称:“EventStore”无法解析,未知 选项:'datadir'
在查看 (RavenDB) 源代码时,连接字符串解析器似乎不知道它正在读取嵌入式连接字符串。但我没有看到任何方式表明 NEventStore 将在嵌入式模式下使用 Raven。
【问题讨论】:
标签: c# ravendb neventstore