What is Entity Framework?

I know this is out of sequence for this blog, but I really needed to get a better grasp on what the Entity Framework is, so I did some research on it, and rather than waste good knowledge, I figured I’d write about it now and we can come back to it later.  At its simplest form, the Entity Framework is kind of a translator between the “object model” of the database (tables grouped by task and likeness of the data) and the application that is using the data from the database (which typically uses OOP structure, so you have methods, properties and events).  So, think of it as a way of using a programming model structure to converse, in programming-type language, with a set of database tables.  This is an overly simple way of looking at it, of course, but then again, that’s my goal with this blog!

The first thing we need to look at is an Entity then, and understand what it means in this context, as this is the fundamental unit of the Entity Framework.  An Entity is actually an instantiation of an Entity Type, much like an object is an instantiation of a class.  Basically, an Entity Type maps to a database table and what it contains, for instance a Person table, so the Entity would be the Object instantiated from this Table.

The other concept to grasp is that of the Relationship – again, a Relationship is an instantiation of a Relationship Type.  A Relationship Type is an association between Entities.  As an example, when you have the above-mentioned Person Table, but you also need data from another table, such as Employment to confirm if someone is indeed employed, you create a Relationship between the Tables.

To put this in “pictures”, if you open the Query Designer, the boxes would be the Entities and the Relationships would be the lines between them when you draw a query out.  Again, this is overly simplistic, but it should help you to get your head around the Entity Framework.  If you want a much more detailed dissertation, I suggest looking at Julie Lerman’s Webpage (she has written two books on the subject) at http://thedatafarm.com/main.aspx.  Another good resource I have found is Frans Bouma’s blog, specifically the post here.


Comments (11)
  1. James says:

    Thank you for that simplistic breakdown. I am just cutting my teeth on all of this and all the other explanations of the Entity Framework that I found were written way over my head and with so much detail I couldn't grasp the basic concept. Your blog helped a lot.

  2. edhickey says:

    Glad it helped you!

  3. Ashlesh says:

    Thanks, it also helped me a lot. Keep blogging. Thanks again.

  4. Jonathan Panlilio says:

    ty sir

  5. Hemant says:


  6. Ray says:

    Helped a bunch, Thanks!

  7. Mike says:

    Does Entity Framework is replacing  LINQ?


  8. Scott says:

    I agree with James. I wanted a brief outline of what it is, and this article provided it. Thanks.

  9. sudha says:

    This article is very much needed for beginners

  10. Shivanand Arur says:

    Hey Ed, Your Blog is really helpful (especially for Beginners)… Thanks for sharing… Will first share this Thread on some Social Networking Sites… Thank you once again.. 🙂

Comments are closed.

Skip to main content