【发布时间】:2012-06-19 02:20:30
【问题描述】:
我正在寻找在 Raven DB 中生成测试数据的首选且可维护的方法。目前,我们的团队确实有办法通过 .NET 代码来实现。提供了示例。
但是,我正在寻找不同的选择。请分享。
public void Execute()
{
using (var documentStore = new DocumentStore { ConnectionStringName = "RavenDb" })
{
documentStore.Conventions.DefaultQueryingConsistency = ConsistencyOptions.QueryYourWrites;
// Override the default key prefix generation strategy of Pascal case to lower case.
documentStore.Conventions.FindTypeTagName = type => DocumentConvention.DefaultTypeTagName(type).ToLower();
documentStore.Initialize();
InitializeData(documentStore);
}
}
编辑: Raven-overflow 真的很有帮助。感谢您指出正确的地方。
【问题讨论】: