Попытка, чтобы на мапстере при тестах не падало
All checks were successful
Run Tests / run_tests (push) Successful in 2m52s

This commit is contained in:
Olga Nemt 2024-12-18 17:02:08 +05:00
parent ef14196c1a
commit 45271df758

View File

@ -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<ITimeSeriesDataRepository<DataSaubDto>, TimeSeriesDataRepository<DataSaub, DataSaubDto>>();