To open the sample app in Visual Studio, in the getting-started-dotnet\aspnet\2-structured-data directory, double-click 2-structured-data.sln.
In the Solution Explorer pane, click Web.config.
In Web.config, complete the following steps:
a. Set GoogleCloudSamples:ProjectId to your project ID.
b. Set GoogleCloudSamples:BookStore to sqlserver.
c. Near the bottom of the file, under <connectionStrings>, find the connectionStrings XML sub-element with the attribute name="LocalSqlServer". Update the connectionString value with the external IP address, database name, username, and password of your SQL Server instance. For example, the connectionString for a remote SQL Server on IP 104.155.20.171 with database = bookshelf, user = dotnetapp and password = test looks like this:
To build the solution, in the Visual Studio menu, click Build and then select Build Solution.
To create the database tables, in the Visual Studio menu, go to Tools > Nuget Package Manager > Package Manager Console. At the PM > prompt, enter the following command:
Add-Migration Init
Create the tables in the SQL Server database that are used to store the books' data for the Bookshelf app. In the Package Manager Console, enter the following command:
Update-Database
Liked By
Write Answer
How to configure settings for visual studio?
Join MindStick Community
You have need login or register for voting of answers or question.
Nishi Tiwari
07-Jan-2020Configuring settings
a. Set GoogleCloudSamples:ProjectId to your project ID.
b. Set GoogleCloudSamples:BookStore to sqlserver.
c. Near the bottom of the file, under <connectionStrings>, find the connectionStrings XML sub-element with the attribute name="LocalSqlServer". Update the connectionString value with the external IP address, database name, username, and password of your SQL Server instance. For example, the connectionString for a remote SQL Server on IP 104.155.20.171 with database = bookshelf, user = dotnetapp and password = test looks like this:
connectionString="Data Source=104.155.20.171;Initial Catalog=bookshelf;Integrated Security=False;User ID=dotnetapp;Password=test;MultipleActiveResultSets=True"
Add-Migration Init
Update-Database