We help IT Professionals succeed at work.

Entity Framework - when should it be used(or not)?

Donncha O'Callaghan
Donncha O'Callaghan asked
I must complete an assignment where I have to put across an opinion with regards to Entity Framework and when it's best used and when alternatives are better utilized.

The piece has to be based on the following 3 topics:

(i) The relationship with Entity Framework development and project management methodologies (eg agile and waterfall)

(ii) The connection between Entity Framework and design methodologies (eg Object Orientated Programming and Relational Database design)

(iii) The integration with Entity Framework and .NET Web Development Frameworks (Web Forms and MVC)

Can anyone give me their views on the above topics as a starting point?
Watch Question

Software Applications Developer / Integrator
Not that we want to do your homework, but here are some thoughts.
The first thing I would attempt to understand is what the Entity Framework is used for. (Data connectivity, CRUD operations, data retrieval/display)
Then understanding what is meant by Code First vs Database(Model) first.
Database first implies that you have a current database that you will be connecting to and retrieving/updating/inserting data into.
Code first means that you will (in your development environment) be creating your tables as you code.

You should try to understand the pros/cons of each.
Database first should mean that you have a solidly modeled and created database that you can feel confident in accessing without creating a database on the fly.
Code first means that you are starting without a database and in some ways consider the database as secondary to the interface. (my opinion, but I come from the first school)
Knowing this, you can then determine if Agile is more attuned to code first coding or if it more attuned to Database first.(and visa versa for Waterfall development methodology.)

Consider that database first would lend itself to strict RDBMS coding (better opportunities to data model, etc), and code first not so much.

I have found that Entity Framework lends itself to creating MVC pages, but doing some small projects of your own will help you to understand the pros/cons and allow you to speak from a position of knowledge.

Consider those things as you move forward with each of your questions.
Daniel ReynoldsSoftware Applications Developer / Integrator

The question was asking for thoughts/opinions on a the Entity Framework and how it relates to Agile vs Waterfall Dev. and a few other items.

Without doing the homework for them, I attempted to shed some light on the particular items to consider.
This answer is the only one that was entered, so thus should earn the points.