Skip to content

Commit 9c9b923

Browse files
committed
added more context
1 parent 12bec75 commit 9c9b923

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/app-service/tutorial-dotnetcore-sqldb-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ Next, update the name of the connection string in `appsettings.json` file to mat
203203
}
204204
```
205205

206-
Next, update the `Startup.cs` file the sample project by updating the existing connection string name `MyDbConnection` to `AZURE_SQL_CONNECTIONSTRING`:
206+
Next, update the `Startup.cs` file the sample project by updating the existing connection string name `MyDbConnection` to `AZURE_SQL_CONNECTIONSTRING`. This change configures the `DbContext` to use the correct connection string in Azure and locally from the `appsettings.json` file.
207207

208208
```csharp
209209
services.AddDbContext<MyDatabaseContext>(options =>
210210
options.UseSqlServer(Configuration.GetConnectionString("AZURE_SQL_CONNECTIONSTRING")));
211211
```
212212

213-
From a local terminal, run the following commands to install the necessary CLI tools for Entity Framework Core, create an initial database migration file, and apply those changes to update the database. Make sure to pass in the connection string you copied from the Azure SQL database for the `connection` parameter, which will override the `localdb` connection string in the `appsettings.json` file.
213+
From a local terminal, run the following commands to install the necessary CLI tools for Entity Framework Core, create an initial database migration file, and apply those changes to update the database. Make sure to pass in the connection string value you copied from the Azure SQL database for the `connection` parameter. The `connection` parameter overrides the value of the connection string that is configured for the `DbContext` in the `startup.cs` file.
214214

215215
```dotnetcli
216216
cd <sample-root>\DotNetCoreSqlDb

0 commit comments

Comments
 (0)