Changed the Info property in InsertResultCommand from string? to short?. Renamed the related parameter in InsertObjectProcedureHandler from pRESULT_INFO to pRESULT_INFO_ID and set its type to SqlDbType.SmallInt to match the new property type.
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using MediatR;
|
|
using ReC.Application.Common.Procedures.InsertProcedure;
|
|
using ReC.Domain.Constants;
|
|
|
|
namespace ReC.Application.Results.Commands;
|
|
|
|
public record InsertResultCommand : IInsertProcedure
|
|
{
|
|
public long? ActionId { get; set; }
|
|
public required RecStatus Status { get; set; }
|
|
public string? Header { get; set; }
|
|
public string? Body { get; set; }
|
|
public short? Info { get; set; }
|
|
public string? InfoDetail { get; set; }
|
|
public string? Error { get; set; }
|
|
public required ResultType Type { get; set; }
|
|
public string? Reference1 { 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 async Task<long> Handle(InsertResultCommand request, CancellationToken cancel)
|
|
{
|
|
return await sender.Send(new InsertObjectProcedure
|
|
{
|
|
Entity = "RESULT",
|
|
Result = request
|
|
}, cancel);
|
|
}
|
|
} |