生成 Fluent NHibernate 映射的工具
我正在尝试将 NHibernate 集成到具有数百个表的现有应用程序中。由于显然没有严格遵守约定,我无法使用 Automap。因此,我将使用 Fluent 手动映射所有关联。
我希望有一个工具可以运行我的解决方案或数据库并存根映射,而不是手动完成。
有谁知道有什么项目考虑到这一点吗?
谢谢!
I am trying to integrate NHibernate into an existing application with several hundred tables. Due to the fact that there apparently wasn't a strict adherence to conventions, I am unable to use Automap. As a result, I'm going to use Fluent to manually map over all of the associations.
Rather than doing it by hand, I'm hoping that there is a tool in existance that can either run through my solution or the database and stub out mappings.
Does anyone know of any project out there with this in mind?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道有什么工具可以在 Fluent 中执行此操作,但有很多选项可以使用旧的 hbm xml 文件执行此操作。建议将 CodeSmith 和 MyGeneration 作为您的类和 hbms 的起点。
I don't know of a tool that does it in Fluent, but there are plenty of options for doing it with the old hbm xml files. CodeSmith and MyGeneration are two that are recommended as a starting point for your classes and hbms.
LLBLGen Pro V3 正是这样做的,它可以为整个数据库生成传统的 .hbm.xml 或流畅的映射。
LLBLGen Pro V3 will do exactly this, it can generate either tradition .hbm.xml or fluent mappings for your entire database.
老问题,也许仍然与某些人相关。如果您正在寻找开源解决方案,请尝试 NHibernate 映射生成器
Old question, maybe still relevant to some. If you are looking for an open source solution, try NHibernate Mapping Generator