如何在 C# 中连接到 RavenHQ
How to connect to RavenHQ in c#
我正在尝试连接到 ravenHQ,我得到
https://database-d0sm.ravenhq.com;Database=DatabaseName;ApiKey=
但是如何将其添加到 C# 中的存储区?
private static IDocumentStore store = new DocumentStore()
{
Urls = new[] { "url" },
Database = "DatabaseName"
}.Initialize();
好的,为了做到这一点,我需要在我的 .net 应用程序中降级 Ravendb 的版本。 api 键仅在 Ravendb 3.5 中受支持。这就是问题所在。
var store = new DocumentStore
{
ConnectionStringName = "MyRavenConnectionString"
};
然后在您的 web.config
或 app.config
<connectionStrings>
<add name="MyRavenConnectionString" connectionString="Url = Url = http://ravendb.mydomain.com;User=user;Password=secret"/>
</connectionStrings>
我正在尝试连接到 ravenHQ,我得到
https://database-d0sm.ravenhq.com;Database=DatabaseName;ApiKey=
但是如何将其添加到 C# 中的存储区?
private static IDocumentStore store = new DocumentStore()
{
Urls = new[] { "url" },
Database = "DatabaseName"
}.Initialize();
好的,为了做到这一点,我需要在我的 .net 应用程序中降级 Ravendb 的版本。 api 键仅在 Ravendb 3.5 中受支持。这就是问题所在。
var store = new DocumentStore
{
ConnectionStringName = "MyRavenConnectionString"
};
然后在您的 web.config
或 app.config
<connectionStrings>
<add name="MyRavenConnectionString" connectionString="Url = Url = http://ravendb.mydomain.com;User=user;Password=secret"/>
</connectionStrings>