2013年7月31日星期三

In ASP.NET MVC 4 using Entity Framework 5.0 Technology

   
  
   

However, this article is to explain the use Entity Framework 4.3.1. Currently, Entity Framework latest version is 5.0, so in the process of development to achieve specific, slightly some differences.

   

same time, Visual Studio 2012 unit test project and Visual Studio 2010 are also some differences, the following I briefly explain.

   

1. use in the project Entity Framework 5.0

   Right-click the project

references, and then select - Manage NuGet package;

   

   

search to EntityFramework package, and then click to install, it will automatically add the Entity Framework in the project references to the latest version (currently version 5.0).

   

   

   

2. In Visual Studio 2012, the unit test

   

First, as shown in the solution added to unit test project:

   

   

complete code written after the test project, the following operations and before the difference yes. Need to follow the following steps to open - Test Explorer window.

   

   

in Test Explorer window is open again after compiling the project, the relevant test methods are automatically added to the window, as shown below:

   

   

click Run or all of the operation, it can be related to the test, and the test results will be displayed in the window.

   

3. in Visual Studio 2012, the analysis unit test code coverage

   

follows manipulate, analyze code coverage:

   

   

code coverage test results as shown below:

   

   

Running Unit Tests with Test Explorer

   

http://www.entlib.net/?p=2164

  
 

没有评论:

发表评论