如何在嵌入模式下运行RavenDb?

发布于 2024-09-25 03:20:31 字数 443 浏览 0 评论 0原文

Ravendb 文档 说在初始化 DocumentStore 之前简单地设置 DataDirectory 名称,但 DocumentStore 没有没有 DataDirectory 属性 :(

var documentStore = new DocumentStore  {  
      DataDirectory = "path/to/database/directory"  
};
documentStore.Initialize();

上面的代码无法编译 :(


好吧,我的错...

我正在使用 Raven.Client-3.5.dll,你必须使用 Raven.Client.dll

Ravendb documentation says to simply set the DataDirectory name before initializing the DocumentStore, but DocumentStore doesn't have a DataDirectory property :(

var documentStore = new DocumentStore  {  
      DataDirectory = "path/to/database/directory"  
};
documentStore.Initialize();

The code above doesn't compile :(


Ok, my bad...

I was using Raven.Client-3.5.dll, you have to use Raven.Client.dll

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

因为看清所以看轻 2024-10-02 03:20:31

是的 - 托管 RavenDB 涉及

  • 动态支持
  • 一整套
    这意味着

你不能在 3.5 中运行它,也不能使用轻量级客户端运行它:)

Yeah - hosting RavenDB involves

  • Dynamic support
  • A whole suite of
    dependencies

This means that you can't run it in 3.5 and you can't run it using the Lightweight client :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文