ADO.NET实体框架与NHibernate [英] ADO.NET Entity Framework vs NHibernate
问题描述
最后,使用NHibernate已经存在了很长时间,而且可能比ADO.NET实体框架更成熟
NHibernate可能会更加成熟。这并不一定意味着它是一个更好的解决方案。在我的工作中使用了一段时间后,我个人宁愿使用几乎任何比NHibernate(即使直接的SQL,如果迁移是可行的)。 NHibernate抛出的错误消息的数量并不意味着什么(或者这意味着什么,但不应该发生)是绝对令人吃惊的,它的一些默认行为也是如此(例如,在查找中返回的每个对象刷新一次会话)
个人而言,当我有选择时,我使用LINQ to SQL进行所有数据库工作。
So the ADO.NET Entity Framework has gotten a little bit of bad press (in the form of blog entries and a petition) but I don't want to rush to judgement. I'm limited in time for experimentation but I was wondering has anyone worked with it yet with more empirical feedback?
Finally, what are thoughts on using NHibernate which has been around for a long time and may be more mature than the ADO.NET Entity Framework.
NHibernate may be more mature. That does not necessarily mean it is a "better" solution. Having used it at my job for some time, I would personally prefer to use almost anything than NHibernate (even straight SQL, if migration were remotely feasible). The number of error messages thrown by NHibernate that don't mean anything (or that do mean something but should never occur) is absolutely staggering, as are some of its default behaviours (such as flushing the session once for each object returned in a Find).
Personally, when I have a choice, I use LINQ to SQL for all database work.
这篇关于ADO.NET实体框架与NHibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!