ADO.NET Entity Framework

May 10, 2010 by Manjunath HK · 2 Comments 

Over the next few days (or may be weeks) am going to be doing a series of posts related to ADO.NET Entity Framework. I’ll also create a sample application to help ensure that you understand most, if not all, of the concepts.

What is ADO.NET Entity Framework?

ADO.NET Framework is an Object-Relationship Management (ORM) tool.

Why use ADO.NET Entity Framework?

The ADO.NET Entity Framework is designed to enable developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications. Entity Framework applications provide the following benefits:

  • Applications can work in terms of a more application-centric conceptual model, including types with inheritance, complex members, and relationships.
  • Applications are freed from hard-coded dependencies on a particular data engine or storage schema.
  • Mappings between the conceptual model and the storage-specific schema can change without changing the application code.
  • Developers can work with a consistent application object model that can be mapped to various storage schemas, possibly implemented in different database management systems.
  • Multiple conceptual models can be mapped to a single storage schema.
  • Language-integrated query (LINQ) support provides compile-time syntax validation for queries against a conceptual model.

Pre-requisites for the sample application:

ADO.NET Entity Framework is included with .NET Framework 3.5 Service Pack 1 and Visual Studio Service Pack 1. Please ensure that you have installed Visual Studio 2008 Service Pack 1 in your system before proceeding with the examples provided in this post.

This framework is built-in default with Visual Studio 2010 and you don’t have to install anything extra.

Also, ensure that you have SQL Server 2005/2008 installed in your system.

SQL Server 2005/2008 Express Editions are free download from Microsoft. Any of these editions is suitable for the sample application we are going to create.