Configuration Files
TechCore uses the standard ASP.NET Core configuration system with these files:appsettings.json- Base configuration for all environmentsappsettings.Development.json- Development-specific overrides
Database Configuration
TechCore uses SQL Server with Entity Framework Core 10.0.3. The connection string is configured in theConnectionStrings section.
Default Connection String
The default configuration inappsettings.json:
- Connects to the local SQL Server instance (
Data Source=.\\) - Uses the database named
TechCore - Uses Windows Authentication (
Trusted_Connection=True) - Trusts the server certificate (
TrustServerCertificate=True)
Customizing the Connection String
For SQL Server with authentication
If using SQL Server authentication instead of Windows Authentication:
Using User Secrets (Development)
For local development, use .NET User Secrets to store sensitive configuration:Application Settings
Logging Configuration
The default logging configuration:Default: Information- Shows informational messages and aboveMicrosoft.AspNetCore: Warning- Reduces noise from ASP.NET Core framework logs
Allowed Hosts
Environment-Specific Configuration
Development Environment
Theappsettings.Development.json file is automatically loaded when running in Development mode. It overrides settings from the base appsettings.json.
Set the environment variable:
Production Environment
For production, set:Database Context Configuration
The database context is configured inProgram.cs:
Program.cs:12-15
- Registers
TechCoreContextas a scoped service - Reads the connection string from configuration
- Configures Entity Framework Core to use SQL Server
Running Migrations
After configuring your database connection, apply migrations:Next Steps
- Running Locally - Build and run the application with your configuration