开发者

How similar are the implementations of hibernate and nhibernate?

开发者 https://www.devze.com 2022-12-15 06:17 出处:网络
How similar are the implementations of hibernate and nhibernate? i.e. if I am comfortable with nhibernate, will hibernate开发者_运维技巧 be a very easy transition?I\'ve used Hibernate a lot and read

How similar are the implementations of hibernate and nhibernate?

i.e. if I am comfortable with nhibernate, will hibernate开发者_运维技巧 be a very easy transition?


I've used Hibernate a lot and read up on NHibernate, and as far as the basics go, they appear very similar.

  • Mapping files (.hbm.xml) are used in both Hibernate and NHibernate, and appear almost identical for simple configurations (except for XML namespaces).
  • While NHibernate configuration isn't done in a hibernate.properties file like in Hibernate, the keys used are the same.
  • The same basic interfaces are used between Hibernate and NHibernate, but they just have an 'I' at the beginning in .NET (SessionFactory vs. ISessionFactory).
  • Most of the basic methods have the same name in NHibernate, but the .NET methods are capitalized unlike in Java (session.Save(user) vs. session.save(user)).
0

精彩评论

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