EF Core Vs Fluent Nhibernate RRS feed

  • Question

  • 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? 



    Tuesday, August 1, 2017 8:02 PM

All replies

  • 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.


    I’m glad to be of help to you.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 3, 2017 5:18 AM