EF Core Vs流利Nhibernate [英] EF Core Vs Fluent Nhibernate

查看:128
本文介绍了EF Core Vs流利Nhibernate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我对EF Core vs nHibernate有疑问。在现有项目中,我使用.NET Core完整框架实现了一个web api,使用Fluent nHibernate与我们的遗留DB2数据库进行交互,并且运行良好。我们选择Fluent NHibernate基于我自己的b $ b自己的经验和专家的意见,nHibernate最适合DDD视角。 
$
(由Vladimir Khorikov MVP专业人员详细介绍它在这里http:// enterprisecraftsmanship.com/2014/11/29/entity-framework-6-7-vs-nhibernate-4-ddd-perspective/)。



他最近也回答了在这里https://disqus.com/by/vladimirkhorikov/#(对于Anders Baumann提出的问题),对于复杂项目,最好使用nHibernate而非EF核心。 



我们即将启动另一个项目,我的管理层希望我考虑使用EF Core,因为这是一个可能有更长期支持的Microsoft产品。我想知道的是对DB2的支持由EF Core改进并具有NH支持的所有
高级功能,如果建议切换到使用EF Core以用于未来项目(仍需要与我们的传统D接口) B2)。如果是这样,EF核心比DB2有什么好处/风险是什么? 
值得转换,还是我应该坚持使用经过验证的Fluent nHibernate方式? 


问候


Radha

解决方案

嗨Radha,


感谢您在此处发布问题。


首先,Microsoft可以为您提供一些售后服务。当您遇到有关EF核心的问题时,您可以在MSDN论坛中获得解决方案。


其次,Entity Framework(EF)Cor​​e是一个轻量级,可扩展且跨平台的版本流行的实体框架数据访问技术。


下面将告诉你NHibernate没有的EF核心的一些优点,如下所示。


  1. EF核心支持    内置架构迁移支持,但NHibernate仅支持初始    模式生成。
  2. EF核心提供种子    支持初始数据库播种的方法,但NHibernate    需要
    第三方。 EF核心有更高的    凝聚力。
  3. EF核心提供    支持异步操作,但NHibernate没有。
  4. EF核心可以使用LINQ    最常见的,但NHibernate有一些限制。

>>如果是这样,EF核心比DB2有什么好处/有什么风险?是否值得切换或者我应该坚持使用经过验证的Fluent nHibernate方式吗?


对于这个问题,这取决于你更熟悉哪一个EF核心或NHibernate。如果你熟悉NHibernate,你可以选择流畅的NHibernate。您还可以尝试使用EF核心来学习EF核心来替换NHibernate。


此外,以下链接将为您提供更多您学到的知识。


https://docs.microsoft.com/en-us/ef/core/


我很高兴为你提供帮助。


最好的问候,


Cole


Hi,

I had a question about EF Core vs nHibernate. In an existing project, I've implemented a web api using .NET Core full framework using Fluent nHibernate to interface with our legacy DB2 database and works great. We chose Fluent NHibernate based on my own experience with it and experts' opinion that nHibernate suits best in DDD perspective. 
(by Vladimir Khorikov MVP professional detailing it here http://enterprisecraftsmanship.com/2014/11/29/entity-framework-6-7-vs-nhibernate-4-ddd-perspective/).

He's also recently answered here https://disqus.com/by/vladimirkhorikov/# (for the question asked by Anders Baumann) that for Complex projects, it's preferable to use nHibernate over EF core. 

We are about to start another project and my management wants me to consider using EF Core since that's a Microsoft product that might have better longer term support. What I'd like to know is if the support for DB2 by EF Core has improved and has all advanced features the NH is supporting and if it's recommended to switch over to using  EF Core for future projects (which still need to interface with our legacy DB2). If so, what are the benefits of EF core over DB2 / what are the risks? Is it worthwhile to switch over or should I stick with the proven Fluent nHibernate way? 

Regards

Radha

解决方案

Hi Radha,

Thank you for posting the problem here.

Firstly, Microsoft can provide you with some after-sales service. When you have some problems about EF core, you can get a solution in MSDN forum.

Secondly, Entity Framework (EF) Core is a lightweight, extensible, and cross-platform version of the popular Entity Framework data access technology.

The following will tell you some advantages of EF core which NHibernate doesn’t have, as follows.

  1. EF core supports      built-in schema migration support, but NHibernate only supports initial      schema generation.
  2. EF core provides a seed      method which supports seeding of the initial database, but NHibernate      needs a third party. EF core has a higher      cohesion.
  3. EF core provides the      support of Asynchronous Operations, but NHibernate doesn’t.
  4. EF core can use LINQ the      most commonly, but NHibernate has some limitations.

>>If so, what are the benefits of EF core over DB2 / what are the risks? Is it worthwhile to switch over or should I stick with the proven Fluent nHibernate way?

For this problem, it depends on which one you are more familiar with EF core or NHibernate. And if you are familiar with NHibernate, you could choose fluent NHibernate. You could also try using EF core to replace NHibernate by learning EF core.

Besides, the following link will provide you more knowledge which you learn.

https://docs.microsoft.com/en-us/ef/core/

I’m glad to be of help to you.

Best Regards,

Cole


这篇关于EF Core Vs流利Nhibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆