diff --git a/DD.Persistence.Repository/DependencyInjection.cs b/DD.Persistence.Repository/DependencyInjection.cs index 9077205..df15095 100644 --- a/DD.Persistence.Repository/DependencyInjection.cs +++ b/DD.Persistence.Repository/DependencyInjection.cs @@ -5,6 +5,7 @@ using DD.Persistence.Models; using DD.Persistence.Repositories; using DD.Persistence.Repository.Repositories; using DD.Persistence.Database.Entity; +using System.Reflection; namespace DD.Persistence.Repository; public static class DependencyInjection @@ -28,6 +29,10 @@ public static class DependencyInjection public static IServiceCollection AddInfrastructure(this IServiceCollection services) { + var typeAdapterConfig = TypeAdapterConfig.GlobalSettings; + typeAdapterConfig.RuleMap.Clear(); + typeAdapterConfig.Scan(Assembly.GetExecutingAssembly()); + MapsterSetup(); services.AddTransient, TimeSeriesDataRepository>();