What are downsides and upsides of Entity Framework in .NET?
-
Opinions about using Entity Framework in .NET. Will it be a problem if tables to be mapped are so many? Discuss all ur thoughts here! :D
-
Answer:
Number of tables is not an issue, you can have a gazillion of tables and as many mappings. Careless usage of EF's context is, however, a big issue. Pay attention to managing your context and implement the Unit of Work pattern.
Andrei Cristof at Quora Visit the source
Other answers
We've been doing a series of posts on the Safari blog about Entity Framework. You might find them helpful - http://blog.safaribooksonline.com/2013/05/20/entity-framework-using-database-migration-to-seed-our-database/
Debbie Gray
Believe perf issues are well handled come EF6. However, accommodating changes to the model is still problematic. Even seeding is tricky and attempts to address these issues are many and not wholly successful. Handling model changes is a biggy though as EF is all about letting you build out a solution from POCO and those classes are invariably subject to revision. Data Migrations is still not robust enough imho and breaks too easy. It's a huge improvement over, well, the absence of migration handling but while in theory it is transparent, it just doesn't work well enough in practice.
John Kelleher
MindScape has a product that compete with EF, Take a look at http://www.mindscapehq.com/products/lightspeed and they have done some comparing against EF.
Jay Janarthanan
Speed will be a factor. Although EF has made drastic improvements in this area, I still prefer https://github.com/SamSaffron/dapper-dot-net for a .NET ORM
Joey Schluchter
Advantages: Fast and straight forward using LINQ/FE objects For Add/Modify/Delete/Update, Easy to map business objects (with drag & drop tables on environment). It keeps a good performance when you work with a small / middle domain model and Less coding required to accomplish complex tasks. DisAdvantages: If there is any schema change in database FE will not work, we have to update the schema in solution as well! and as the queries are dynamic there might be a hit in the performance of the application.
Swayam Infologic
Entity Framework and any similar technology has one fundamental philosophical flaw: it assumes that an application developer has complete control over the database. In an enterprise world this is simply not true and unlike using SQL language, Entity Framework is not flexible enough and is simply unable to accommodate all possible database designs. In most enterprise settings database is completely outside your influence and you are designing or maintaining one of 50 or 100 different applications using it. Even if the tables you are currently using will work with Entity Framework, there is zero guarantee that: 1. the DB design will not change for reasons outside your control to a state where Entity Framework cannot work with it, 2. Microsoft will not abandon supporting EF and instead will run after something more shiny 3 years into your lifecycle (something Microsoft does quite often). SQL is "eternal" because it is a natural scientific outcome of a concept of a relational database. You can use the same SQL for as long as relational databases will exist, by comparison Microsoft introduced and abandoned several mapping technologies in just the last 15 years. Now, if you are writing a relatively simple application that can be completed in 6 months and will have a lifecycle of 5 years , you are good to go. But look at my situation for example: I created a massive industrial web application. Its primary development took 10 years. It will be in production quite possible for 25 years. Can you imagine me chasing after every new concept Microsoft introduces when my development started under MS Windows XP, IE 5.5 and .NET 1.1??? On a system spanning 14 separate programs, with a million LOC there would be no time for primary development, all we would do is constantly update code to the newest shiniest MS data mapping tech. On the other hand queries written 2004 still work in 2016... People in the corporate HQ can still remove my indexes and primary keys from the central DB without telling me and the application still works... To sum up: Form a technological point ET is great, assuming you have full control over DB design and maintenance and you are not the guy who will have to explain 7 years from now why the company has to spend $150k, because you used a technology without staying power.
Joshua Christos
Related Q & A:
- What are the object-oriented features of Visual Basic.NET?Best solution by msdn.microsoft.com
- How to make Entity Framework migrations work?Best solution by Stack Overflow
- How to combine 3 tables using entity framework and LINQ?Best solution by Stack Overflow
- What are different types of Entities in Entity Framework?Best solution by entityframeworktutorial.net
- What is the best way to advertise on the net?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.