我正在尝试连接到ravenHQ,我得到了

https://database-d0sm.ravenhq.com;Database=DatabaseName;ApiKey=

但是,如何将其添加到C#中的存储中?

    private static IDocumentStore store = new DocumentStore()
    {
        Urls = new[] { "url" },
        Database = "DatabaseName"
    }.Initialize();


好的,为此,我需要在.net应用程序中降级Ravendb的版本。仅Ravendb 3.5支持api密钥。这就是问题所在。

最佳答案

var store = new DocumentStore
{
    ConnectionStringName = "MyRavenConnectionString"
};


然后在您的web.configapp.config

<connectionStrings>
   <add name="MyRavenConnectionString" connectionString="Url = Url = http://ravendb.mydomain.com;User=user;Password=secret"/>
</connectionStrings>

关于c# - 如何在C#中连接到RavenHQ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54679524/

10-10 04:53