VS 2010 Database Project: Adding Tables

Posted Sun, May 2 2010 22:43 by Deborah Kurata

The new Visual Studio 2010 Database Project, as described in this prior post, makes it easy to work with scripts for an existing database or build new scripts directly within Visual Studio. This post details how to add table scripts to a Database project

Start by adding a VS 2010 Database project to your solution following the steps in this prior post. Then follow the steps below to add tables to your project.

1. Right click on the Tables node for the Database project in Solution Explorer.

image

2. Select Add | Table.

This opens the Add New Item dialog:

image

3. Enter the name of the new table and click the Add button.

The table script template then appears in the code editor and you can enter the information for the table.

image

Notice that there is no visual editor available here as there is in Server Explorer. But if you know SQL, it is quick to enter the columns in the table.

When you are ready to apply the table script to your development database, you can deploy the script as detailed in this post.

Use this technique any time you want to add a table script to your project.

Enjoy!

Filed under: , , , , ,

Comments

# 使用VS2010的Database 项目模板统一管理数据库对象

Saturday, May 08, 2010 10:36 AM by ASP.NET Chinese Blogs

阅读: 31 评论: 0 作者: geff zhang 发表于 2010-05-08 23:19 原文链接 Visual Studio 2010 有一个数据库项目模板:Visual Studio Database

# 使用VS2010的Database 项目模板统一管理数据库对象

Saturday, May 08, 2010 10:44 AM by ASP.NET Chinese Blogs

阅读: 53 评论: 1 作者: geff zhang 发表于 2010-05-08 23:19 原文链接 Visual Studio 2010 有一个数据库项目模板:Visual Studio Database

# VS 2010 Database projects - treat your database as code

Thursday, July 29, 2010 7:19 PM by Geek #

VS 2010 Database projects - treat your database as code

# VS 2010 Database projects - treat your database as code

Thursday, July 29, 2010 11:11 PM by Geek #

VS 2010 Database projects - treat your database as code

# VS 2010 Database projects - treat your database as code

Friday, July 30, 2010 4:36 PM by Geek #

VS 2010 Database projects - treat your database as code

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: