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.
24 lines
631 B
C#
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);
|
|
}
|
|
} |