generating POCO data classes and database contexts based on an existing database requires a Visual Studio extension-Entity Framework Power Tools (a Code first reverse engineering tool). Just enter the "Entity Framework Power" Search in the Visual Studio extension to find the latest extensions, click Download (for example). Of course you can also come here to install the Entity Framework Power Tools Beta 4 Download installation package.
Code first works with the entity Framework Power Tools Beta 4 to improve the efficiency of code First:
1. View the existing code first
The Entity Framework option appears on the class that inherits from DbContext, and you can graphically view the ER diagram of the class in that context.
This is a big boost to code First's design and reading.
You can also generate SQL for code first, view it as XML, and so on.
2. Convert the database you have built into code first
Transferred from: http://blog.csdn.net/xingxing513234072/article/details/13294367
Code first works with entity Framework Power Tools Beta 4