Refactor InsertResultCommand references into DTO
Replaced Reference1–5 string properties in InsertResultCommand with a single References property of type InvokeReferencesDto? for better maintainability. Added necessary using directive for the new DTO.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
using ReC.Application.Common.Procedures.InsertProcedure;
|
using ReC.Application.Common.Procedures.InsertProcedure;
|
||||||
|
using ReC.Application.RecActions.Commands;
|
||||||
using ReC.Domain.Constants;
|
using ReC.Domain.Constants;
|
||||||
|
|
||||||
namespace ReC.Application.Results.Commands;
|
namespace ReC.Application.Results.Commands;
|
||||||
@@ -14,11 +15,7 @@ public record InsertResultCommand : IInsertProcedure
|
|||||||
public string? InfoDetail { get; set; }
|
public string? InfoDetail { get; set; }
|
||||||
public string? Error { get; set; }
|
public string? Error { get; set; }
|
||||||
public required ResultType Type { get; set; }
|
public required ResultType Type { get; set; }
|
||||||
public string? Reference1 { get; set; }
|
public InvokeReferencesDto? References { get; set; }
|
||||||
public string? Reference2 { get; set; }
|
|
||||||
public string? Reference3 { get; set; }
|
|
||||||
public string? Reference4 { get; set; }
|
|
||||||
public string? Reference5 { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InsertResultProcedureHandler(ISender sender) : IRequestHandler<InsertResultCommand, long>
|
public class InsertResultProcedureHandler(ISender sender) : IRequestHandler<InsertResultCommand, long>
|
||||||
|
|||||||
Reference in New Issue
Block a user