C#C
C#2y ago
renchuu

✅ Storing connection string securely

I am developing a web API and I created my database first on azure. To create the models i used this command

Scaffold-DbContext "CONNECTION STRING" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

Now I have my string right in the DBcontext.cs file. I don't want to keep the string in the code like that.

How can I store my string in a secure way?
Was this page helpful?