When choosing an ORM, is LINQ to SQL or LINQ to Entities better than NHibernate?

后端 未结 6 1369
萌比男神i
萌比男神i 2021-01-02 19:05

I find I can do more with NHibernate, and even Castle than with the Linq to Entities, or linq to SQL.

Am I crazy?

6条回答
  •  醉话见心
    2021-01-02 19:23

    I've used both NHibernate and LINQ to SQL. From my point of view it depends on the project, if I need something quick, I would choose L2S, it's so simple to create the dbml mapping and start using it. If I'm developing a more highlevel enterprise solution I would go for the tried and trusted ORM - NHibernate, I find the logging & transaction features simple to use.

    LINQ to SQL has a relatively short learning curve, NHibernate has a much steeper learning curve.

    LINQ to SQL only supports SQL Server, so if you've an Oracle database then the decision is already made - NHibernate.

    I'd recommend checking out http://www.summerofnhibernate.com/ for excellent screencasts on learning NHibernate.

提交回复
热议问题