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.
This commit is contained in:
@@ -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<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"));
|
||||
}
|
||||
}
|
||||
@@ -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<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"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user