Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Entity Framework more than a very time consuming way to save a little time?

I got about two chapters into a 1000+ page on entity framework and got discouraged and went back to good old stored procedures.

What is the consensus (if any) on Entity Framework? It would be interesting to hear from folks who have finished projects based on EF to see if they think it was worth all the effort.

I've been tinkering around with T4 templates a bit and found a way to generate my SPROCs and DTOs just the way I like them without messing around with EF. Am I missing something?

like image 571
John Hoge Avatar asked Feb 11 '11 14:02

John Hoge


People also ask

Why is Entity Framework so slow?

Databases grow alongside our clients' business. But since the load of systems increases over time, it could cause the entity framework slow performance. Another reason for the performance degradation is a change in business rules.

What is the advantage and disadvantage of Entity Framework?

It provides capability of programming a conceptual model. It's easy to map business objects (with drag & drop tables). It does not work if we change any schema of the database. We need to update the schema on the solution.

What is the biggest advantage of having Entity Framework in your application?

What are the advantages of the Entity Framework? Entity Framework helps to reduce development time and development cost. It provides auto-generated code and allows developers to visually design models and mapping of databases. It allows easy mapping of Business Objects.


2 Answers

I personally like the abstraction and easy integration with LINQ that is possible with Entity framework, having an ORM instead of interacting with SQL server directly is huge in terms of productivity.

On the other hand it's by no means complete - for anything that requires bulk-processing, i.e. large table delete's or full text search you still have to do store queries - but at least it minimizes the number of them that I have to deal with to those scenarios.

like image 85
BrokenGlass Avatar answered Sep 29 '22 07:09

BrokenGlass


I've been tinkering around with T4 templates a bit and found a way to generate my SPROCs and DTOs just the way I like them without messing around with EF. Am I missing something?

Not necessarily. The process you described is the basic reasoning behind any ORM.

The Entity Framework provides a few things that your T4 templates may not:

  1. A Microsoft-standard way of creating data classes
  2. The ability to scale into large applications
  3. The ability to support different data stores with the same code.
  4. Flexibility

EF is part of a larger picture that encompasses things like built-in data validation, lazy loading, multi-tier design, and testability. If you are building very small applications that will never grow into larger applications, you may not need these things.

like image 30
Robert Harvey Avatar answered Sep 29 '22 05:09

Robert Harvey