правки по результатам свалившихся тестов (пока были 2 настройки мапстера)
Some checks failed
Run Tests / run_tests (push) Failing after 2m2s

This commit is contained in:
Olga Nemt 2024-12-18 16:27:10 +05:00
parent dfd486219b
commit 38d2099a81
3 changed files with 12 additions and 7 deletions

View File

@ -16,12 +16,12 @@ namespace DD.Persistence.API;
public static class DependencyInjection
{
public static void MapsterSetup()
{
TypeAdapterConfig.GlobalSettings.Default.Config
.ForType<TechMessageDto, TechMessage>()
.Ignore(dest => dest.System, dest => dest.SystemId);
}
//public static void MapsterSetup()
//{
// TypeAdapterConfig.GlobalSettings.Default.Config
// .ForType<TechMessageDto, TechMessage>()
// .Ignore(dest => dest.System, dest => dest.SystemId);
//}
public static void AddSwagger(this IServiceCollection services, IConfiguration configuration)
{
services.AddSwaggerGen(c =>

View File

@ -27,7 +27,7 @@ public class Startup
services.AddMemoryCache();
services.AddServices();
DependencyInjection.MapsterSetup();
//DependencyInjection.MapsterSetup();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

View File

@ -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<TechMessageDto, TechMessage>()
.Ignore(dest => dest.System, dest => dest.SystemId);
}
public static IServiceCollection AddInfrastructure(this IServiceCollection services)