diff --git a/DD.Persistence.API/DependencyInjection.cs b/DD.Persistence.API/DependencyInjection.cs index b5068cc..b0a71d5 100644 --- a/DD.Persistence.API/DependencyInjection.cs +++ b/DD.Persistence.API/DependencyInjection.cs @@ -16,12 +16,12 @@ namespace DD.Persistence.API; public static class DependencyInjection { - public static void MapsterSetup() - { - TypeAdapterConfig.GlobalSettings.Default.Config - .ForType() - .Ignore(dest => dest.System, dest => dest.SystemId); - } + //public static void MapsterSetup() + //{ + // TypeAdapterConfig.GlobalSettings.Default.Config + // .ForType() + // .Ignore(dest => dest.System, dest => dest.SystemId); + //} public static void AddSwagger(this IServiceCollection services, IConfiguration configuration) { services.AddSwaggerGen(c => diff --git a/DD.Persistence.API/Startup.cs b/DD.Persistence.API/Startup.cs index 09e4a21..c6c44a4 100644 --- a/DD.Persistence.API/Startup.cs +++ b/DD.Persistence.API/Startup.cs @@ -27,7 +27,7 @@ public class Startup services.AddMemoryCache(); services.AddServices(); - DependencyInjection.MapsterSetup(); + //DependencyInjection.MapsterSetup(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) diff --git a/DD.Persistence.Repository/DependencyInjection.cs b/DD.Persistence.Repository/DependencyInjection.cs index 6a2e5f4..3e60e1e 100644 --- a/DD.Persistence.Repository/DependencyInjection.cs +++ b/DD.Persistence.Repository/DependencyInjection.cs @@ -4,6 +4,7 @@ using DD.Persistence.Database.Model; using DD.Persistence.Models; using DD.Persistence.Repositories; using DD.Persistence.Repository.Repositories; +using DD.Persistence.Database.Entity; namespace DD.Persistence.Repository; public static class DependencyInjection @@ -21,6 +22,10 @@ public static class DependencyInjection Id = src.Id }); + TypeAdapterConfig.GlobalSettings.Default.Config + .ForType() + .Ignore(dest => dest.System, dest => dest.SystemId); + } public static IServiceCollection AddInfrastructure(this IServiceCollection services)