如何在Visual Studio IDE中键入数据库表的某些值

时间:2015-11-17 15:32:52

标签: c# asp.net-mvc

我下载了ASP.NET MVC本书的源代码,它看起来如此,我可以看到该表,但我需要在其中输入一些数据,以便它可以向我显示 我应该去哪里输入数据?

enter image description here

1 个答案:

答案 0 :(得分:1)

While you should actually do this in SQL Server Management Studio, Visual Studio does offer you some support to deal with data. To do so, Open Server Explorer (Ctrl+Alt+S) in VS. Create a data connection, if it doesnt exist already to the DB in question by right clicking on Data Connection and click on Add Connection. Since you downloaded the source code for exercises, there is a good chance that they already created one for you. Once you have a connection to your desired database, you will be able to see database object under that including tables. To add data to a table, right click on that table and click on Show Table Data. You can then go to individual cells and enter data. Hitting enter should submit the data change to SQL Server.

Hope this helps..