Refactor API base URL config to use AppSettings class

Replaced direct IConfiguration usage with a strongly-typed AppSettings class for accessing the API base URL. Registered AppSettings with DI and updated Dashboard.razor to use IOptions<AppSettings>. Updated using statements and DI setup for improved type safety and centralized configuration management.
This commit is contained in:
OlgunR
2026-04-20 11:32:45 +02:00
parent cd0a824064
commit 27c8f92a3b
4 changed files with 14 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
namespace DbFirst.BlazorWebApp;
public class AppSettings
{
public string ApiBaseUrl { get; set; } = string.Empty;
}