diff --git a/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs b/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs index 219fd9c..a235156 100644 --- a/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs +++ b/src/ReC.Application/OutResults/Commands/CreateOutResCommand.cs @@ -1,8 +1,10 @@ -using System.Text.Json; +using DigitalData.Core.Abstraction.Application.Repository; +using MediatR; +using System.Text.Json; namespace ReC.Application.OutResults.Commands; -public class CreateOutResCommand +public class CreateOutResCommand : IRequest { public static readonly string EmptyJson = JsonSerializer.Serialize(new object(), options: new() { @@ -16,4 +18,12 @@ public class CreateOutResCommand public string Body { get; set; } = EmptyJson; public string? AddedWho { get; set; } +} + +public class CreateOutResCommandHandler(IRepository repo) : IRequestHandler +{ + public Task Handle(CreateOutResCommand request, CancellationToken cancel) + { + return repo.CreateAsync(request, cancel); + } } \ No newline at end of file