namespace Database.Configuration { public class DatabaseConfiguration { public const string SectionName = "Database"; public string ConnectionString { get; set; } = string.Empty; public bool EnableSensitiveDataLogging { get; set; } = false; public bool EnableDetailedErrors { get; set; } = false; public int CommandTimeout { get; set; } = 30; public bool AutoMigrate { get; set; } = false; public bool SeedTestData { get; set; } = false; public string Environment { get; set; } = "Development"; public PoolingOptions Pooling { get; set; } = new(); public RetryOptions Retry { get; set; } = new(); } public class PoolingOptions { public int MinPoolSize { get; set; } = 5; public int MaxPoolSize { get; set; } = 100; public int ConnectionIdleLifetime { get; set; } = 300; // seconds public int ConnectionPruningInterval { get; set; } = 10; // seconds } public class RetryOptions { public bool EnableRetryOnFailure { get; set; } = true; public int MaxRetryCount { get; set; } = 5; public int MaxRetryDelay { get; set; } = 30; // seconds public List ErrorNumbersToAdd { get; set; } = new(); } }