Try one ORM: Entity Framework
As promised in the last article, We are going to share our experience of Entity Framework Ver 4.1.
First of all, we have to add and configure Entity Framework in visual studio. We are going to use “NuGet” manager.
Steps to check whether “NuGet” manager is already installed.
1)Open Visual Studio 2010, Go to Tools menu and click on Library Package Manager.
If NuGet is not installed,Follow the below steps to install it through Extension Manager.
1)Open Visual Studio 2010, Go to Tools menu and click on Extension Manager.
2) On left hand side, you will find Online Gallery, Click on it.
3) Download NuGet Package Manager and install it.
What is NuGet Package Manager?
From codeplex “NuGet is a free, open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third-party libraries into a .NET application during development.”
We use several third party libraries in the project development and have to each location for the library and integrate the library in our project which is quite a painful process in the long run. NuGet heals the process by introducing a package management which streamline the process of sharing and using open source libraries.
Steps to add Entity Framework:
1)Go to Project,Click on Manage NuGet Packages.
2) Search for Entity Framework and Install.
3) Our recommendation is to download POCO also. Open Extension Manager again and Go to online Gallery, Here search for EF.
2)Download and Install EF 4.x POCO Entity generator for c#
We will provide a more detailed article for POCO sometime in future as it can’t be covered in one or two lines.
To see the results of successful installation, Add new item to the project and see Entity Data Model Template in the window.
Later, we will use these models to demonstrate “Model First Approach” and “Code First Approach”.