From 7214b09640019e3146c17f5631a2a0949f51c71a Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 25 Nov 2025 15:38:53 +0100 Subject: [PATCH] Add AutoMapper and MediatR; implement DtoMappingProfile Added `AutoMapper` and `MediatR` NuGet packages to the `ReC.Application.csproj` file to include these libraries as dependencies. Created a `DtoMappingProfile` class in the `ReC.Application.Dto` namespace to define a mapping configuration between the `RecAction` entity and the `RecActionDto` data transfer object using `AutoMapper`. Included necessary `using` directives for `AutoMapper` and `ReC.Domain.Entities` in the `DtoMappingProfile.cs` file to enable the mapping functionality. These changes improve maintainability by automating object-to-object mapping and prepare the project for potential use of the mediator pattern with `MediatR`. --- src/ReC.Application/Dto/DtoMappingProfile.cs | 12 ++++++++++++ src/ReC.Application/ReC.Application.csproj | 1 + 2 files changed, 13 insertions(+) create mode 100644 src/ReC.Application/Dto/DtoMappingProfile.cs diff --git a/src/ReC.Application/Dto/DtoMappingProfile.cs b/src/ReC.Application/Dto/DtoMappingProfile.cs new file mode 100644 index 0000000..5aa9fa4 --- /dev/null +++ b/src/ReC.Application/Dto/DtoMappingProfile.cs @@ -0,0 +1,12 @@ +using AutoMapper; +using ReC.Domain.Entities; + +namespace ReC.Application.Dto; + +public class DtoMappingProfile : Profile +{ + public DtoMappingProfile() + { + CreateMap(); + } +} diff --git a/src/ReC.Application/ReC.Application.csproj b/src/ReC.Application/ReC.Application.csproj index 243cdca..a9766be 100644 --- a/src/ReC.Application/ReC.Application.csproj +++ b/src/ReC.Application/ReC.Application.csproj @@ -7,6 +7,7 @@ +