NHibernate的T4模板?- 不是 Fluent NHibernate [英] T4 template for NHibernate? - not Fluent NHibernate
问题描述
想知道是否有人知道一组 T4 模板,用于生成 C# POCO 类以及从数据库中的一组表映射 NHibernate 的 XML 文件.我看到 David Hayden 已经创建了用于基于 DBML 模型生成 FluentNH 代码的 T4,但我还没有准备好使用 FluentNH,因为还没有正式版本(尽管我喜欢这个想法).
Wondering if anyone knows of a set of T4 templates for generating C# POCO classes and also mapping XML files for NHibernate from a set of tables in a database. I saw that David Hayden has created T4 for generating FluentNH code based upon a DBML model, but I'm not quite ready to use FluentNH yet as there isn't even an official release yet (although I love the idea).
有人知道使用普通 NHibernate 的任何 T4 模板吗?
Anyone know of any T4 templates for using plain NHibernate?
推荐答案
后续:我决定为 NHibernate xml 映射文件和 POCO 类编写自己的代码生成器.我模仿了 T4 Toolbox 项目中的 Linq to SQL 生成器.
Follow-up: I decided to write my own code generator for NHibernate xml mapping file and POCO classes. I modeled it after the Linq to SQL generator in the T4 Toolbox project.
我计划一有机会就在我的网站上发布体验并提供下载.如果您有兴趣,请告诉我,我会尽快完成.
I plan to post about the experience and provide a download on my site as soon as I get the chance. Let me know if you're interested and I'll hurry it up.
这篇关于NHibernate的T4模板?- 不是 Fluent NHibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!