1. It is best to ensure that Microsoft Visual Studio 2010 on the machine has installed patches of SP1 or higher.
2. Open the corresponding project to use EF in vs2010
3. Install EF using the nuget direct online library in vs2010. The steps are as follows:
Main Menu in vs2010-> tool-> library Package Manager-> Add library package reference/manage packages for solution...
The agent is automatically searched online under online/all, and then installed by clicking Entity Framework. If an error occurs during the installation process, you can install the agent using the PM command line.
Run the following command on the console to install buzhou: Main Menu of vs2010-> tool-> library Package Manager-> Package Manager Console
Enter the following content: PM> install-package entityframework-version 4.2.0.0 (the version number can be changed based on the latest version displayed online)
The installation prompt is successful!
Note:If the nuget version is low, you can:
In vs2010, choose Main Menu> Tools> extended Manager> online library to retrieve nuget Package Manager from the Microsoft website and download and install it. After nuget is installed,
If you do not have nuget or want to upgrade the latest version, you can uninstall the old version, download the new version of nuget, and install it on your own. The address is:
Http://nuget.codeplex.com/then use the previous step to install EF.
Note:It is recommended that you have installed efcodefirst on Windows powershell 2.0 and Windows Remote Management (winrm) 2.0 before using the PM command line to install efcodefirst.
From http://www.microsoft.com/downloads/zh-cn/details.aspx? Familyid = 60cb5b6c-6532-45e0-ab0f-a94ae9ababf5 download the installation package
For details, refer:
Http://blog.csdn.net/yangzhencheng_001/article/details/6684853
And http://www.open-open.com/lib/view/open1325293664483.html