connection string
A text value that tells a database client where the database is and how to log in, such as Data Source=catalog.db.
A leaked connection string can give direct access to the database.
In more detail
Its exact format depends on the database provider. It often contains a password, so keep real ones out of source control and supply them through user secrets or the deployment environment.
Related terms
- Entity Framework Core — Microsoft's object-relational mapper for .NET, which lets code query and save database data as C# objects and translates LINQ into SQL.
- secret — Any value that grants access, such as a password, access token or private key, and must be kept out of code and version control.
- user secrets — A .NET development tool that stores secrets for a project in your user profile, outside the project folder, so they never reach source control.
Taught in
- The Options Pattern: Strongly Typed Configuration — Modern .NET Core, C# & Enterprise Microservices
- Environment Layering and User Secrets — Modern .NET Core, C# & Enterprise Microservices
- Entity Framework Core: Code First and Migrations — Modern .NET Core, C# & Enterprise Microservices