ReC/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs
TekH a7cb237fb6 Refactor CreateOutResCommand properties
Removed unused System.Text.Json dependency and the `EmptyJson` field. Updated `ActionId` to be required during initialization. Changed `Header` and `Body` properties to nullable strings without default values.
2025-12-01 13:01:58 +01:00

24 lines
631 B
C#

using DigitalData.Core.Abstraction.Application.Repository;
using MediatR;
using System.Text.Json;
namespace ReC.Application.OutResults.Commands;
public class CreateOutResCommand : IRequest
{
public required long ActionId { get; set; }
public string? Header { get; set; }
public string? Body { get; set; }
public string? AddedWho { get; set; }
}
public class CreateOutResCommandHandler(IRepository<CreateOutResCommand> repo) : IRequestHandler<CreateOutResCommand>
{
public Task Handle(CreateOutResCommand request, CancellationToken cancel)
{
return repo.CreateAsync(request, cancel);
}
}