Home > 2010 Fall DPS907 > Entity Framework introduction

Entity Framework introduction

This post will introduce DPS907/WSA500 students to the Entity Framework.

As stated in Monday’s notes, and adapted from the MSDN Library documentation:

The Entity Framework is a set of technologies in ADO.NET that support the development of data-oriented software applications.

It enables developers to work with data in the form of domain-specific objects and properties, such as customers and customer addresses, without having to concern themselves with the underlying database tables and columns where this data is stored.

With the Entity Framework , developers can work at a higher level of abstraction when they deal with data, and can create and maintain data-oriented applications with less code than in traditional applications.

Note: Starting now, and into the future, Microsoft and the industry recommend that developers use the Entity Framework in data-oriented applications.

An Entity Framework data model is the next evolution of the ADO.NET data access layer (e.g. DataSet) technologies.


Naming Entity Framework components

In the last class, we introduced and explained some suggestions for naming your Entity Framework components. To summarize, as new learner of Entity Framework technologies:

  • The “.edmx” source code file’s name doesn’t matter very much; it is not referenced in code
  • The “model namespace” name is fairly important; use a descriptive two-part name, with “Model” as the last part; e.g. “NorthwindModel”
  • The “entity container” class name is very important; use a descriptive two-part name, with “Entities” as the last part; e.g. “NorthwindEntities”


Visual Studio tools

Design surface (.edmx)

Inspecting the entities (example shown at the right)

Model browser


Using an Entity Framework data model in code

In aspx markup…

In C#…

Summary – very similar to working with data sets (data access layer)

(will be demonstrated in class)


More to come

The lecture discussion will be added to these notes very soon.




Categories: 2010 Fall DPS907
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: