From 38d2099a81d5efd68e28f5330e48aa5fc37ad4a0 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Wed, 18 Dec 2024 16:27:10 +0500 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D1=80=D0=B5=D0=B7=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=D0=BC=20=D1=81=D0=B2=D0=B0=D0=BB=D0=B8=D0=B2=D1=88=D0=B8?= =?UTF-8?q?=D1=85=D1=81=D1=8F=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2=20(?= =?UTF-8?q?=D0=BF=D0=BE=D0=BA=D0=B0=20=D0=B1=D1=8B=D0=BB=D0=B8=202=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20=D0=BC?= =?UTF-8?q?=D0=B0=D0=BF=D1=81=D1=82=D0=B5=D1=80=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DD.Persistence.API/DependencyInjection.cs | 12 ++++++------ DD.Persistence.API/Startup.cs | 2 +- DD.Persistence.Repository/DependencyInjection.cs | 5 +++++ 3 files changed, 12 insertions(+), 7 deletions(-) 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)