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`.
This commit is contained in:
2025-11-25 15:38:53 +01:00
parent 21d09df037
commit 7214b09640
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
using AutoMapper;
using ReC.Domain.Entities;
namespace ReC.Application.Dto;
public class DtoMappingProfile : Profile
{
public DtoMappingProfile()
{
CreateMap<RecAction, RecActionDto>();
}
}

View File

@@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="15.1.0" />
<PackageReference Include="MediatR" Version="13.1.0" />
</ItemGroup>