Files
ReC/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs
TekH 06af6dd43c Refactor CreateOutResCommandHandler for OutRes entity
Updated CreateOutResCommandHandler to use the OutRes entity
instead of the command itself in repository operations. Added
a new using directive for ReC.Domain.Entities. Updated the
CreateOutResCommand class to implement MediatR's IRequest
interface.
2025-12-03 09:29:02 +01:00

24 lines
621 B
C#

using DigitalData.Core.Abstraction.Application.Repository;
using MediatR;
using ReC.Domain.Entities;
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<OutRes> repo) : IRequestHandler<CreateOutResCommand>
{
public Task Handle(CreateOutResCommand request, CancellationToken cancel)
{
return repo.CreateAsync(request, cancel);
}
}