From 6a247193421a50a978f9655806e717ae062b2879 Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 16 Jan 2026 10:40:28 +0100 Subject: [PATCH] Remove obsolete MappingProfile classes from Endpoints/RecActions Removed AutoMapper MappingProfile classes from ReC.Application.Endpoints and ReC.Application.RecActions. These profiles mapped command objects to DTOs with default values. The change reflects a move toward using procedures or views for these mappings. --- src/ReC.Application/Endpoints/MappingProfile.cs | 17 ----------------- .../RecActions/MappingProfile.cs | 17 ----------------- 2 files changed, 34 deletions(-) delete mode 100644 src/ReC.Application/Endpoints/MappingProfile.cs delete mode 100644 src/ReC.Application/RecActions/MappingProfile.cs diff --git a/src/ReC.Application/Endpoints/MappingProfile.cs b/src/ReC.Application/Endpoints/MappingProfile.cs deleted file mode 100644 index a5c5a68..0000000 --- a/src/ReC.Application/Endpoints/MappingProfile.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ReC.Application.Endpoints.Commands; -using ReC.Application.Common.Dto; - -namespace ReC.Application.Endpoints; - -// TODO: update to inject AddedWho from the current host/user contex -public class MappingProfile : AutoMapper.Profile -{ - [Obsolete("Use the related procedure or view.")] - public MappingProfile() - { - CreateMap() - .ForMember(e => e.Active, exp => exp.MapFrom(cmd => true)) - .ForMember(e => e.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow)) - .ForMember(e => e.AddedWho, exp => exp.MapFrom(cmd => "ReC.API")); - } -} diff --git a/src/ReC.Application/RecActions/MappingProfile.cs b/src/ReC.Application/RecActions/MappingProfile.cs deleted file mode 100644 index 328f78a..0000000 --- a/src/ReC.Application/RecActions/MappingProfile.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ReC.Application.Common.Dto; -using ReC.Application.RecActions.Commands; - -namespace ReC.Application.RecActions; - -// TODO: update to inject AddedWho from the current host/user contex -public class MappingProfile : AutoMapper.Profile -{ - [Obsolete("Use the related procedure or view.")] - public MappingProfile() - { - CreateMap() - .ForMember(e => e.Active, exp => exp.MapFrom(cmd => true)) - .ForMember(e => e.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow)) - .ForMember(e => e.AddedWho, exp => exp.MapFrom(cmd => "ReC.API")); - } -} \ No newline at end of file