From b922cbbb303d6a9bc02db2503b3253ca4a2542bf Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 26 Mar 2026 10:32:24 +0100 Subject: [PATCH] Remove ConfigureDbModel from dependency injection setup Eliminated all references to ConfigureDbModel in DependencyInjection.cs, including related imports, configuration methods, and required service tracking. Dependency injection configuration is otherwise unchanged. --- src/ReC.Application/DependencyInjection.cs | 28 +--------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/ReC.Application/DependencyInjection.cs b/src/ReC.Application/DependencyInjection.cs index dd304d1..3edfb77 100644 --- a/src/ReC.Application/DependencyInjection.cs +++ b/src/ReC.Application/DependencyInjection.cs @@ -6,7 +6,6 @@ using ReC.Application.Common.Behaviors; using ReC.Application.Common.Behaviors.InvokeAction; using ReC.Application.Common.Constants; using ReC.Application.Common.Options; -using ReC.Application.Common.Options.DbModel; using ReC.Application.RecActions.Commands; using System.Reflection; @@ -57,8 +56,7 @@ public static class DependencyInjection private readonly Dictionary _requiredServices = new() { { nameof(ConfigureRecActions), false }, - { nameof(LuckyPennySoftwareLicenseKey), false }, - { nameof(ConfigureDbModel), false } + { nameof(LuckyPennySoftwareLicenseKey), false } }; internal void EnsureRequiredServices() @@ -140,29 +138,5 @@ public static class DependencyInjection return this; } #endregion ConfigureSqlException - - #region ConfigureDbModel - public ConfigurationOptions ConfigureDbModel(Action configure) - { - _configActions.Enqueue(services => services.Configure(configure)); - - if (_requiredServices[nameof(ConfigureDbModel)]) - throw new InvalidOperationException("DbModelOptions have already been configured."); - _requiredServices[nameof(ConfigureDbModel)] = true; - - return this; - } - - public ConfigurationOptions ConfigureDbModel(IConfiguration configuration) - { - _configActions.Enqueue(services => services.Configure(configuration)); - - if (_requiredServices[nameof(ConfigureDbModel)]) - throw new InvalidOperationException("DbModelOptions have already been configured."); - _requiredServices[nameof(ConfigureDbModel)] = true; - - return this; - } - #endregion ConfigureDbModel } }