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

后端 未结 6 1350
萌比男神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:16

    Blockquote Linq certainly though fits in with the general 'way' in which .NET works

    Yikes, this kind of sentiment scares me. The RAD stuff built into .net is NOT how dot net works, it's just a tool set for getting prototypes up. .NET allows us to do full DDD applications, w/ high levels of cohesion, seperations of concerns, and allows us to write decoupled code, despite all the attemps ms makes to couple things. I would strongly disagree that .net likes to be coupled, certian tools like to be coupled, i'll include linq to sql in this fray. linq to sql destroys the idea of having a seperate domain model. I cringe at the thought of using my database schema as the underlying model objects. Proper ORM tools should allow us to model our domain first, then link our relational database to these models. NOT the other way around.

提交回复
热议问题