Solved

Entity Framework

Posted on 2011-03-14
3
380 Views
Last Modified: 2012-05-11
What are the pros and cons of this tool?  It reminds me a bit of hibernate, which is generally slow, and not very efficient.  I have not used it however, so anyone who actually has used it as part of an enterprise solution I would appreciate your opinion / experience with it.
0
Comment
Question by:mddohm
3 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 250 total points
ID: 35134335
Entity Framework is an ORM (object relational mapping) tool just like nhibernate. I disagree that nhibernate (or any ORM) is "generally" slow. They can absolutely be slow in some circumstances, but you have to use the right tool for the job.

Like any tool it depends on what you are trying to use it for. I personally think that for OLTP applications it's a huge time-saver for developers. Fill in an object graph, attach it to the context, and SaveChanges(). The framework figures out what needs to be inserted, updated, and deleted.

If you're trying to run reports or perform huge, complicated queries, stored procedures are probably a better way to go.

P.S. EF is the backbone of our data access strategry, but we still use sprocs when it makes sense.
0
 
LVL 10

Assisted Solution

by:Asim Nazir
Asim Nazir earned 250 total points
ID: 35135559
Go through Q & A by Microsoft at http://msdn.microsoft.com/en-us/magazine/cc507640.aspx 
0
 
LVL 2

Expert Comment

by:Kyle_BCBSLA
ID: 35137403
I have built a web application from the ground up using Entity Framework and, frankly, I find it to be faster than classic ASP.  Utilizing LINQ-to-Entities queries appropriately should provide very fast results and responses because the language is designed to enhance the query being requested.  This is still fairly young so I have faced a few minor drawbacks but that is only because I am on .Net Framework 3.5.  It is my understanding that the .Net Framework 4.0 has resolved the issues faced and I cannot wait for my enterprise to move to that platform which should be some time next quarter.  

As CraigWagner said it is a huge time saver for developers because you have an object context already created.  The framework is smart enough to know what CRUD operation to use but that isn't the nicest part.  Utilizing LINQ with EF gives you run-time support.  Because the queries are strongly-typed the compiler will know if the query being provided is successful and will throw an error during build prior to running the application if it is not.  This is unlike classic ASP where SQL queries were developed with strings and you were never sure that they worked until you actually run the query in debug.  This is a major time saver in itself.  

And there really is so much more!  Lastly, Microsoft is focusing on this project as well as LINQ-to-Entities (which is based on the context EF model) and this will be rapidly changing every new release.  

Hope this helps a bit,
Best of Luck
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question