Replaced references to ReC.Domain.Entities with ReC.Application.Common.Dto across multiple files to use DTOs in the application layer. Updated MappingProfile.cs namespace to ReC.Application.RecActionViews and adjusted using statements accordingly. These changes improve separation of concerns and ensure commands and mappings operate on DTOs rather than domain entities.
16 lines
578 B
C#
16 lines
578 B
C#
using ReC.Application.Common.Dto;
|
|
using ReC.Application.RecActions.Commands;
|
|
|
|
namespace ReC.Application.RecActionViews;
|
|
|
|
// TODO: update to inject AddedWho from the current host/user contex
|
|
public class MappingProfile : AutoMapper.Profile
|
|
{
|
|
public MappingProfile()
|
|
{
|
|
CreateMap<CreateRecActionCommand, RecActionDto>()
|
|
.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"));
|
|
}
|
|
} |