From 343825cb38c74d64baa010f5109aa082de1cf6ff Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Fri, 24 Nov 2023 08:50:00 +0500 Subject: [PATCH] remove unused code --- AsbCloudInfrastructure/DependencyInjection.cs | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/AsbCloudInfrastructure/DependencyInjection.cs b/AsbCloudInfrastructure/DependencyInjection.cs index e5095db4..7dbae82f 100644 --- a/AsbCloudInfrastructure/DependencyInjection.cs +++ b/AsbCloudInfrastructure/DependencyInjection.cs @@ -46,15 +46,6 @@ namespace AsbCloudInfrastructure public static class DependencyInjection { - public static IAsbCloudDbContext MakeContext(string connectionString) - { - var options = new DbContextOptionsBuilder() - .UseNpgsql(connectionString) - .Options; - var context = new AsbCloudDbContext(options); - return context; - } - public static void MapsterSetup() { TypeAdapterConfig.GlobalSettings.Default.Config @@ -300,20 +291,6 @@ namespace AsbCloudInfrastructure services.AddTransient(); return services; - } - - public static IServiceCollection AddTransientLazy(this IServiceCollection services) - where TService : class - where TImplementation : class, TService - => services.AddTransient() - .AddTransient(provider => new Lazy(provider.GetRequiredService)); - - public static IServiceCollection AddTransientLazy(this IServiceCollection services, Func implementationFactory) - where TService : class - where TImplementation : class, TService - => services.AddTransient(implementationFactory) - .AddTransient(provider => new Lazy(() => implementationFactory(provider))); - + } } - }