为什么RavenDB EmbeddedableDocumentStore依赖于Raven.Database程序集?
我试图在单元测试项目中使用为什么RavenDB EmbeddedableDocumentStore依赖于Raven.Database程序集?,ravendb,Ravendb,我试图在单元测试项目中使用Raven.Client.Embedded.embeddedableDocumentStore(Build 960),如下所示: private IDocumentStore CreateDocumentStore() { var store = new EmbeddableDocumentStore { RunInMemory = true, Conventions = new DocumentConve
Raven.Client.Embedded.embeddedableDocumentStore
(Build 960),如下所示:
private IDocumentStore CreateDocumentStore()
{
var store = new EmbeddableDocumentStore
{
RunInMemory = true,
Conventions = new DocumentConvention
{
DefaultQueryingConsistency = ConsistencyOptions.QueryYourWrites,
IdentityPartsSeparator = "-"
}
};
store.Initialize();
IndexCreation.CreateIndexes(typeof (RavenIndexes).Assembly, store);
return store;
}
我通过NuGet安装了以下RavenDB组件:
- 嵌入式的
- RavenDB.客户
RavenDB.scappler
etc),只留下RavenDB.Database
引用?还是我出了什么差错?当然,embeddedabledocumentstore
不需要我安装整个RavenDB.Database包
谢谢Embeddeble取决于数据库,因为当您运行Embeddeble时,您正在应用程序中运行整个数据库服务器引擎,并且数据库包包含该引擎。好的,这是有意义的。对于那些只想运行内存中数据库(通常用于单元测试)的人来说,可能会有一个精简的NuGet软件包,而不是所有的铃铛和哨子。