Skip to content

Commit f6e0403

Browse files
committed
work
1 parent fbd7a11 commit f6e0403

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

entity-framework/efcore-and-ef6/porting/port-code.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Most APIs that you use in EF6 are in the `System.Data.Entity` namespace (and rel
2525

2626
As described in [configuring the database connection](xref:efcore-and-ef6/porting/port-detailed-cases#configuring-the-database-connection), EF Core has less magic around detecting the database to connect to. You will need to override the `OnConfiguring` method on your derived context, and use the database provider specific API to setup the connection to the database.
2727

28-
Most EF6 applications store the connection string in the applications `App/Web.config` file. In EF Core, you read this connection string using the `ConfigurationManager` API. You may need to add a reference to the `System.Configuration` framework assembly to be able to use this API.
28+
Most EF6 applications store the connection string in the applications `App/Web.config` file. In EF Core, you read this connection string using the `ConfigurationManager` API. You may need to add a reference to the `System.Configuration` framework assembly to be able to use this API:
2929

3030
```csharp
3131
public class BloggingContext : DbContext
@@ -40,6 +40,9 @@ public class BloggingContext : DbContext
4040
}
4141
```
4242

43+
> Warning
44+
> Never store passwords or other sensitive data in source code or configuration files. Production secrets shouldn't be used for development or test. Secrets shouldn't be deployed with the app. Production secrets should be accessed through a controlled means like Azure Key Vault. Azure test and production secrets can be stored and protected with the [Azure Key Vault configuration provider](/aspnet/core/security/key-vault-configuration).
45+
4346
## Update your code
4447

4548
At this point, it's a matter of addressing compilation errors and reviewing code to see if the behavior changes will impact you.

0 commit comments

Comments
 (0)