Mark ObtainEndpointCommand and mapping as obsolete

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.
This commit is contained in:
2026-01-12 11:07:17 +01:00
parent d3aa8c715b
commit e5bb61376a
2 changed files with 3 additions and 0 deletions

View File

@@ -7,11 +7,13 @@ using ReC.Domain.Entities;
namespace ReC.Application.Endpoints.Commands;
[Obsolete("Use the related procedure or view.")]
public class ObtainEndpointCommand : IRequest<EndpointDto>
{
public string Uri { get; init; } = null!;
}
[Obsolete("Use the related procedure or view.")]
public class ObtainEndpointCommandHandler(IRepository<Endpoint> repo, IMapper mapper) : IRequestHandler<ObtainEndpointCommand, EndpointDto>
{
public async Task<EndpointDto> Handle(ObtainEndpointCommand request, CancellationToken cancel)

View File

@@ -6,6 +6,7 @@ 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>()