Entity Framework vs NHibernate, which is better

I currently use ADO.Net and I would like to switch to Entity Framework, but my co worker uses NHibernate and says its more mature than Entity Framework. I just wanted to get opinions on the difference between the two and which one is better (easier to use, better performance, etc)chuckdawit

On 1/2/2012 2:36 PM, Gaurav Arora wrote:
> I was too in doubt before read this post :
>
http://ayende.com/blog/4351/nhibernate-vs-entity-framework-4-0
>
> EF4.0 is having much matured than earlier versions but still it needs
> ages to get stable as nHibernate
I have nothing against nHibernate. I have worked with it in 3 shops. In
one shop,  nHibernate was an absolute dog, and it was dead slow.  In the
other shop nHipernate was ok with the speed and was using Afluent.
However, in both of those shops nHibernate was a PITA to deal with, and
one had to build all those objects by hand. The other shop had a 3rd
party version of nHiberate that had a designer that built the objects,
but it was too slow, and the shop went back to ADO.NET and T-SQL/

Similar Messages

  • Where can I download ODAC 11.2.0.2.50 Beta for Entity Framework?

    Hello,
    An application I have been developing during the last quarter of 2011 was using ODP.NET 11.2.0.2.50 which was the last beta version with Entity Framework support before final release. I would like to upgrade to Release 4 now but unfortunately it is not likely to happen with the actual project. Problem is that since I lost the installer for both 32 and 64bits versions and that the download is not available on the Oracle Downloads website anymore I can't deploy the application on new machines.
    The name of the file was ODAC1120250Beta_EntityFramework_32bit.zip but I can't find it anywhere on the web or only leads to dead links. Would appreciate a bit of help on that.
    Thank you.
    Lionel.

    So what can i use rather then 11.2.0.2.50 that will be supported for entity frame work
    i used "ODTwithODAC112030" but it is not supported by ADO. net entity model framework.
    my problem:
    i made a entity model but i cannot access data from oracle database.Nothing show in the client side data grid.

  • CRVS2010 Beta - WPF / Entity Framework example?

    Has anyone been successful integrating Entity Framework objects into the CR WPF viewer?  The designer seems to work, but all we get is a blank page.  Trying to load the entities directly runs into trouble from the "not-nullable" problem and the nullable custom entities don't shoe up in the field selector (not sure why). 
    If you can share a positive experience, we'd appreciate it.

    I've been able to produce a report of our Entity Framework data by moving the data into local objects.  The WPF Report Viewer seems incapable of referring to classes in other projects of the solution.  More importantly when I try to use the Database Expert to use certain objects (tables) which link to each other through foreign keys, I am unable (because of viewer errors) to display the report.  Is anyone else working in a similar environment?

  • To download ODAC 11.2.0.2.50 Beta for Entity Framework

    from where can i download ODAC 11.2.0.2.50 Beta for Entity Framework?
    anyone please help me.

    So what can i use rather then 11.2.0.2.50 that will be supported for entity frame work
    i used "ODTwithODAC112030" but it is not supported by ADO. net entity model framework.
    my problem:
    i made a entity model but i cannot access data from oracle database.Nothing show in the client side data grid.

  • Calling Oracle stored procedure with out param of user define type from Entity Framework 5 with code first

    Guys i am using Entity Framework 5 code first (I am not using edmx) with Oracle and all works good, Now i am trying to get data from stored procedure which is under package but stored procedure have out param which is user define type, Now my question is
    how i will call stored procedure from entity framework
    Thanks in advance.

    I agree with you, but issue is we have lots of existing store procedure, which we need to call where damn required. I am sure those will be few but still i need to find out.
    If you think you are going to get existing MS Stored Procedures  or Oracle Packages that had nothing to do with the ORM previously to work that are not geared to do simple CRUD operations with the ORM and the database tables, you have a rude awakening
    coming that's for sure. You had better look into using ADO.NET and Oracle Command objects and call those Oracle Packages by those means and use a datareader.
    You could use the EF backdoor, call Oracle Command object and use the Packages,  if that's even possible, just like you can use MS SQL Server Stored Procedures or in-line T-SQL via the EF backdoor.
    That's about your best shot.
    http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx

  • Multiple database users, ORM, entity framework, best practices

    Hello everyone!
    You've already helped me several times, however I must ask for an advice once more.
    I was assigned to develop .NET application with Data Access Layer and I've decided to use Oracle Database Software to provide sample data.
    As I'm absolute novice considering creating DAL I'd be grateful if you can examine my plan in terms of security and reliability:
    My database:
    1) I've created database with sample tables and relations between them. All tables belongs to databaseAdmin.
    2) I've created HR and Manager database users and granted them some privileges on certain databaseAdmin's tables. My intention is to reduce access to unnecessary tables. If my application user want to make some changes to Customers table it should be enough to connect to database as HR.
    And now I'd like to map my database using Entity Framework in my application. And that's where I have a problem:
    -If I create Entity Model basing on databaseAdmin tables I get perfect model, however every Entity SQL query would be executed on behalf of databaseAdmin, which breaks my idea of hiding unnecessary tables.
    -If I create Entity Model for HR and Manager users, my models could overlap on tables that both users have access to and no connection between tables would be generated (as from their point of view those tables are just some tables that belong to databaseAdmin)
    Could you help me with this deadlock? Or maybe my assumptions about multiple database users are incorrect? Please, bear in mind I'm a novice.
    I was trying to find a solution in web, and there're tons of data discussing technical aspects of Entity Framework etc., but not so many documents about conceptual model of database.

    hi Michael,
    Thanks for you posting!
    Sorry for I am not totally understanding your issue. Maybe two points need your confirm:
    1. I confuse with the "Service controller"? IS your meaning MVC controller? Or ServiceController(http://www.codeproject.com/Articles/31688/Using-the-ServiceController-in-C-to-stop-and-start
    2.whether  The type of ID in the model is match to the database ? In other words, Is the type of IDin .edmx matched to the database?
    By the way, it seems that this issue is more related to EF. You could post this issue on EF discussion for better support.
    Thanks & Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create ViewModel in an MVVM application using entity framework where database has many-to-many relationship?

    I have started developing a small application in WPF. Since I am completely new to it, to start with I took a microsoft's sample available at
    Microsoft Sample Application and following the pattern of the sampke I have been so far successful  in creating four different views for their corresponding
    master tables. Unfortunately, I have got stuck up as the sample does not contain pattern for creating ViewModel when there is a many-to-many relationship in the database. In my application, I have the following data structure:
    1. Table Advocate(advId, Name)
    2. Table Party (partyId, Name)
    3 Table Case (caseId, CaseNo)
    4. Link Table Petitioner (CaseId, PartyId)
    5. Link Table Respondent (CaseId, PartyId)
    6. Link Table EngagedAdvocate(CaseId, advId)
    7. Link Table EngagedSrAdvocate(CaseId, advId)
    In the scenario above, I am a bit confused about how to go forward creating the required ViewModel which would render me to have multiple instances of Petitioners, Respondents, Advocates and SrAdvocates.
    Please explain details in step by step manner considering that whatever work I have completed so far is a replica of Microsoft's sample referred above. I would also like to mention that I have developed my application
    using VB.net. So please provide solution in vb.net.
    After getting many-to-many relationship introduced into my application, it would achieve one level above the sample application and I would like to share with the community so that it could be helpful to many aspiring developers seeking help with MVVM.

    Hi ArunKhatri,
    I would suggest you referring to Magnus's article, it provides an example of how you could display and let the user edit many-to-many relational data from the Entity Framework in a dynamic and data-bound DataGrid control in WPF:
    http://social.technet.microsoft.com/wiki/contents/articles/20719.wpf-displaying-and-editing-many-to-many-relational-data-in-a-datagrid.aspx
    You can learn how to design the ViewModel and the relationship between the entities.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Entity Framework doesn't create the database in SQL Server Management 2012, instead it just creates in (localdb)\v11.0 How to fix it?

    Hi, I'm Begginer in Entity Framework. Then I'm having some problems.
    I created my entities and I give Save Changes. (Ok)
    Then, I Tried to Connect with the database through Server Explorer, if I use the instance of the SQL Server Management Studio 2012(PC-PAULO\INSTANCIAPJ) as Server Name, the database doesn't appears but, if I use the the instance (localdb)\v11.0 the dabase
    appears.
    How to change the save to the SQL Server Management Studio 2012, I don't know where this (localDB)\v11.0 saves.
    Help-me Thank you :D

    Hello PauloJos,
    The code should be ok and it is really strange that the database is only created into the local database in your machine. I am wondering if it is related with the machine environment, could you please have a try with below demo on your machine which works
    on my side and if it is possible, please have a try to run your application on other machines to see if it works:
    class Program
    static void Main(string[] args)
    #region https://social.msdn.microsoft.com/Forums/en-US/00eff3c4-2336-4807-9212-e6f2a6c8812e/entity-framework-doesnt-create-the-database-in-sql-server-management-2012-instead-it-just-creates?forum=adodotnetentityframework
    using (CFDbContext db = new CFDbContext())
    db.Database.CreateIfNotExists();
    #endregion
    public class CFDbContext : DbContext
    public CFDbContext() : base("UltraFoda3") { }
    public DbSet<TestOne> TestOnes { get; set; }
    public class TestOne
    public int ID { get; set; }
    public string Name { get; set; }
    Config file is similar:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </configSections>
    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
    <parameters>
    <parameter value="v11.0" />
    </parameters>
    </defaultConnectionFactory>
    <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
    </entityFramework>
    <connectionStrings>
    <add name="UltraFoda3" connectionString="Data Source=YourServer;Initial Catalog=UltraFoda3;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    </connectionStrings>
    </configuration>
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • WCF Data Service from Entity Framework 5 in SharePoint 2013

    not sure which forum is best, so im going to throw it in here.
    I am working on a proof of concept. I want to create a WCF Data Service within sharepoint 2013. not only do i want to do that, i want to use the Entity Framework 5 to expose the data via OData. Now, I have crawled the internet and seen various examples of
    how to create wcf data services and wcf services in sharepoint 2010/2013. and have tried to apply those as needed to create this POC. So.. what I have done so far. 
    MonitoringData.cs
    [BasicHttpBindingServiceMetadataExchangeEndpoint]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    [System.Runtime.InteropServices.Guid("0185abf6-e8b8-42e2-9965-6bb644338077")]
    public class MonitoringData : DataService<MonitoringServiceEntities>
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(DataServiceConfiguration config)
    // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
    // Examples:
    config.SetEntitySetAccessRule("*", EntitySetRights.AllWrite);
    config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
    MonitoringData.svc:
    <%@ServiceHost Language="C#" Debug="true"
    Service="$SharePoint.Type.0185abf6-e8b8-42e2-9965-6bb644338077.AssemblyQualifiedName$"
    Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressDataServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    upon deployment, this error when hitting the https://server/_vti_bin/poc/monitoringdata.svc/$metadata
    "The type 'xxxxxxxx', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could
    not be found."
    Breaking out the google-fu, i found that adding the dll to the <compilation> section was needed for the web.config. so i did that. and now i just get a blank screen with no errors.
    so i crack open fiddler. i see the following 
    200 http
    tunnel to
    server:443 0
    401 https
    server /_vti_bin/poc/monitoringdata.svc/$metadata
    16
    401
    https server
    /_vti_bin/poc/monitoringdata.svc/$metadata
    0
    404
    https server
    /_vti_bin/poc/monitoringdata.svc/$metadata
    0
    best i can see is that im either not authorized, and its returning null (which shouldnt be the case) or something is just busted.
    The goal is to use ntml auth and https to connect to this service. any ideas?

    One thing I found was that it's never worth the trouble to place the WCF service in a web site running SharePoint, it's better to place it in a dedicated web site, as described in this article:
    http://sharepointdragons.com/2011/10/07/parallel-programming-in-sharepoint-2010-the-back-to-the-future-pattern/
    It's usually too much work to get the web.config settings right because of the settings it inherits from its parents.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com
    I'll say that it is one solution to move the WCF Service outside of sharepoint. but my "1000 mile" requirements makes this a necessity. 
    To broaden the scope of what I am doing, I have a custom SharePoint Service Application. this custom application has a proxy that used a restful interface. Now, with all the methods i will have to write (over 100, x3 for all of the "proxy to a proxy" scenarios)
    I wanted to explore the idea of using odata. so i can use the various clients to write their own queries instead of me writing them all and exposing them. especially since its all linq queries to a database underneath. I feel that I am missing some specific
    component to make this work, and its surely due to my incomplete knowledge of WCF or EF.

  • Update the database structure from entity Framework Model

    Hello !
    I'm using VB.net , EF6 with SQL server 2008R2 database.
    This is the situation :
    I have created the application. Using wizard I have created the Entity model from an existing database.
    A client start using this application using this database on his computer.
    After some month , I made some modifications on the database and I have updated the model on my application .
    Now I have a new .exe file that has the new model from the new database.
    I put the new .exe file on the client computer.
    Now on his computer : The .exe file has the new database model , but the sql server database has the old structure.
    I want to know : Is possible to update the database structure from the entity model on application ?
    I want to add a command on application that can make ( if is possible ) this update , so the database become up to date according to entity model ?
    Thank you !

    Hello,
    From your description, it seems that you want to apply a migration for a database first approach, unfortunately, as far as I know, EF Migrations is a product targeted at Code First and doesn't support Database First operations. A workaround I know is to
    use update-scripts. If your database structure would be changed frequently, it is recommended to use the Code First approach which would have a better workaround for migrations, for details, you could refer to this
    video,
     and with the
    Entity Framework Power Tools, it is easy to create a code first based project form an existing database.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Good or Bad: Repository pattern with Entity framework??

    Suggestions about not to use enttity framework because:
    1) entity framework is itself a Repository pattern
    2) So, what the use of having one more repository pattern over an exisitng repositroy pattern (i.e Entity framework)
    Please suggest.
    Thanks in advance!!

    I've used both nHibernate and the Entity Framework 6 and nHibernate wins hands down as the best orm, despite it's learning curve. ORMs can be massive timesavers as you don't end up writing boiler plate db access code.
    I used 3 different versions on nHibernate over the years. I didn't paticulalry care for any version of nHibernate. I much prefer EF over nHibernate any day of the week, month or year.
    Unlike the previous responder I disagree with testability, each repository should have it's own interface. And if implemented correctly it can save tones of time as you need only mock one or two repository methods rather than 10s or 100s of database
    gateway call using one class per table.
    What? Like a  DAO can't  have an interface, which is just as testable as any repository pattern using an interface when using a test harnerss and testproject to test the DAO? And one has to go beyond some generic repository pattern in
    unit, functional and intergation testing when it comes to data access. 
    Unlike you, I want complete control of the object all aspects of it even in its usage of other DAO(s) that could or would be used, which the  repository pattern doesn't cut it for me. 
    Like I said, I'll take EF over nHibernate, which is much like talking MS SQL Server over Oracle with Oracle being a PITA to work with it.

  • Added 3 tables in Entity framework

    I added 3 tables to my EF: 2 tables for data and the third for connection between them (= 3 columns in this table, first ID as
    the primary key, and the second and the third are FK to the other two tables).
    But the problem is that the third table was added with just the first column (= ID).
    Why is that?

    Hello shirley111,
    >>But the problem is that the third table was added with just the first column (= ID).
    Could you please tell which approach you are using, code first, model first or database first? And how do you define these three tables? Please also share them with us. Currently, we cannot understand what exactly happens on your side.
    Here are some information about many to many relationship in Entity Framework which might be helpful(from your description, it seems that you are trying to make a * to * relationship):
    Configure Many-to-Many relationship using Code First Approach
    Entity Relationships
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Sorting is wrong with Entity Framework for oracle

    Hi,
    I've downloaded the Entity Framework for Oracle beta and I found a bug. It's easy to repro:
    - Create a model with a simple table
    - Create a dynamic data web app
    - display the content of your table and try to sort
    -> the sql generated is wrong and only sorts on the currently displayed rows and not the entire data.
    Did anyone else notice that?
    Edited by: lnu on 14 févr. 2011 05:51

    Before ODP.NET beta with EF was available I was working with OracleEFProvider from CodePlex (sample alpha version but works with VS2010).
    I found the same issue there. Since I had a source code I managed to find the solution.
    In class which implemented the base class DbExpressionVisitor there was a method: public override ISqlFragment Visit(DbSkipExpression e)
    I had to add sort clause AFTER visiting the expression (which was done too early in previous code).
    As the main idea of DbExpressionVisitor should be the same in case of Oracle provider, this can be the reason of improper sorting in queries with paging.

  • Microsoft open sourced the Entity Framework

    http://weblogs.asp.net/scottgu/archive/2012/07/19/entity-framework-and-open-source.aspx
    Microsoft wants others to get involved in building the next version of the Entity Framework.
    The source code is found here:
    http://entityframework.codeplex.com/
    The Mono Project is working to get the open sourced Entity Framework to work on Mono.
    So, with Oracle working on a thin ODP.NET provider, hopefully, it will work on Mono too. But no guarantee from Oracle. I know at first, the thin ODP.NET provider will not support Entity Framework, but down the road it could (hopefully).

    I'm using NHibernate and I'm more satisfied with it than EF.
    Alex said that the final release for managed provider will come with Oracle 12 which maybe will come at the end of the year.

  • Latest Entity Framework version to be used with DB2

    I am looking for a Entity Framework Provider for DB2 (UDB) in my local Windows 7 machine to implement Entity Framework 6.0 with DB2. Is that provider available?
    If not any Provider from IBM is supporting it?
    If both of the above questions turned negative, for which older EF version (5,4 etc...) has Microsoft/IBM Entity Provider to work with DB2? what's the name of the dll reference?

    Hello JAISH,
    For issues regarding DB2, it is beyond the scope of our support for this forum, i suggest you could post it to the DB2 forum to confirm how to get the last version of EF provider for DB2:
    https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000842
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How do you know if you should return your iPhone 3G due to malfunctions

    Well I have been having some problems with my iPhone lately but I'm not sure if it is something that I can fix on my own or if it is a defect. Here are some of the things I have been experiencing. 1) Like a few others on the boards my phone has been

  • Windows 8.1 and ADE 4.0.

    using windows 8.1 and ADE 4.0.  ADE stops working when minimize to taskbar.  Have uninstalled and reinstalled.  did not solve problem.  Please help as this is very annoying.

  • How do I straighten photo's in a batch by the same mount?

    I'm doing a timelapse movie and I want to straighten all my photo's by the same amount at the same time. Can I do this in iPhoto? If not, is there some other program I could use. Thanks, Blitz

  • LogitechHeadphones and Mac Mini

    I have had a USB Logitech microphone/headphones for about one year now. It works well with my dad's eMac, it worked with my iMac G3 Lime, and it works with Windows computers, but it won't work with my brand new 1.83 GHz Mac Mini. The microphone works

  • Check-In not locked for structure element in SOLMAN_DIRECTORY

    Hi, In  the solution manager, as a pre-requisite of the one of the upgrade project, all the BPS nodes should be checked in the solution directory. But we are not able to check in . Getting below  error message. " Check-In not locked for structure ele