开发者

NHibernate : Do i have to create classes & objects by hand?

I am creating DAL with NHibernate. do i need to create classes & mapping files by hand ? Like in Linq to Sql & Entity Framework they are created automatically by vsts?

Is there any such tool for NH开发者_StackOverflow社区ibernate ?


There is a new commerial tool for nhibernate that does what you want called Visual NHibernate: http://www.slyce.com/

There is also a free open source one called Active Writer: http://altinoren.com/activewriter/

Most people prefer to write the mapping and classes by hand because the greater power and flexibility it gives. So I would personally not recommend to auto generate it unless perhaps it is a simple report app.


Fluent NHibernate, a separate open source project that builds on NHibernate, will Automap classes (with certain restrictions).

This is a link to the documentation page for Auto Mapping

(If this was helpful in any way, please vote for it. And when you get a few answers, mark the best one as Accepted)


Focusing on your domain is kind of the point of NHibernate. It gets coders out of writing SQL and into writing code, which is what we're supposed to be good at.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜