2013年6月2日 星期日

Entity Framework–Model First, Part 3 (Execute script to create database)

In previous step(Generate database schema), we successfully generated xxx.edmx.sql script file

image_thumb[35]

 

Look at table definition, we can see what we did changes

1. The Max Length of Industry = 50

2. The Type of OrderDate & ShipToAddress, datetime & geography

image_thumb[36]

The Primary Key constraints

image_thumb[37]

The Foreign Key constraints

image_thumb[38]

 

Now if everything is ok, we can then right-click to Execute the script

image_thumb[40]

Make sure again we are connect to right destination, click Connect button for next step

image_thumb[23]

Once done, we are able to see the successfully completed message

image_thumb[41]

The final step, we can open Server Explorer to check the database and tables are all been created

image_thumb[25]

沒有留言:

張貼留言