Friday, May 11, 2012

How to configure and use Entity Framework

This blog-post is dedicated to share my experience while configuring and using Entity Framework 4.1 for my open source project which I am planning to release. This blog-post will contain all those experience which I faced while configuring and using Entity framework 4.1. This blog will help you with step by step explanation for configuring and using Entity Framework.

ADO.NET Entity Framework

ADO.NET Entity Framework (EF) is an object-relational mapping (ORM) framework for the .NET Framework. For more details refer to wikipedia

To begin with, lets have a look at how to configure Model First approach of configuring and using Entity Framework 4.1.

Model First

A new Model First approach was supported in Visual Studio 2010, which was released together with the second Entity Framework version (Entity Framework v4). In Model First approach the development starts from scratch. At first, the conceptual model is created with Entity Data Model Designer, entities and relations are added to the model, but mapping is not created. After this Generate Database Wizard is used to generate storage (SSDL) and mapping (MSL) parts from the conceptual part of the model and save them to the edmx file. Then the wizard generates DDL script for creating database

Visual studio supports many features so that we can easily add Entity Framework to our project. To Add Entity Framework to a project you will need a package manager.

Lets see how to add a package manager extension to visual studio.

The full post has been moved to

This blog initially contained explained article on how to configure entity framework, later I decided to move this and several other post which I had to my own domain which is GoNetDotNet. It can be found at I am updating this site with articles on Microsoft technologies.


  1. I was looking for a good article for configuring Entity Framework and finally i found this. Thanks for providing this good article to start with.

  2. Helpful post on Configuring Entity Framework. This post have helped a newbie like me!!! ty ..

  3. Yes good explanation i can configure now.Thanks

  4. very simple and easy to understand article on configuring entity frameworks.. thx a lot !

  5. Thanks Libish Very Helpful Article.Keep Writing..

  6. This blog is all about manually configuring ADO.NET Entity Framework. Specifically ADO.NET Entity Framework 4.1.
    This will give a step by step explanation to How to configure Entity Framework.