Mark ObtainEndpointCommand, its handler, and related mapping profile as [Obsolete] with guidance to use the new procedure or view-based approach. This deprecates the old command and mapping logic in favor of updated patterns.
18 lines
624 B
C#
18 lines
624 B
C#
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<ObtainEndpointCommand, EndpointDto>()
|
|
.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"));
|
|
}
|
|
}
|