使用 Simple.Data 生成模式?
有没有办法使用 Simple.Data 库执行数据库模式生成(类似于 Fluent NHibernate 的做法)?
如果没有,是否有办法通过 Simple.Data 库对数据库运行 DDL(数据定义语言)命令?
目前,在一些集成测试中,我正在动态创建一个 SQL CE 数据库,自动生成架构(通过 Fluent NHibernate),运行测试(通过 Simple.Data 访问数据库) >),然后在测试运行后删除数据库(用于清理)。
如果能够使用 Simple.Data 执行 DDL 并删除 Fluent NHibernate 依赖项,那就太好了。
Is there a way to perform database schema generation with the Simple.Data library (similar to how Fluent NHibernate does it)?
If not, is there a way to run DDL (Data Definition Language) commands against a database via the Simple.Data library?
Currently in some integration tests I am creating a SQL CE database on the fly, auto generating the schema (via Fluent NHibernate), running the tests (accessing the database via Simple.Data), then deleting the database after the tests run (for cleanup).
It would be nice to be able to perform the DDL stuff using Simple.Data and remove the Fluent NHibernate dependency.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用 Fluent Migrator 来构建数据库架构 (https://github.com/schambers/fluentmigrator/)。这就是 Simple.Data 迁移可能的样子,因此重新发明轮子似乎没有什么意义。
Simple.Data 0.10 将有一个新的 InMemory 适配器,它是无模式的,以减少测试摩擦。 11月底就会出来。
I recommend using Fluent Migrator for building DB schema (https://github.com/schambers/fluentmigrator/). It's what Simple.Data migrations would probably look like, so there seems little point reinventing the wheel.
Simple.Data 0.10 will have a new InMemory adapter which is schema-less, to reduce testing friction. Will be out by the end of November.