From 48e981222456221421f1cf8e207c5f2f4b4d1e40 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 17 Dec 2025 11:55:23 +0100 Subject: [PATCH] Add handler for CreateResultViewCommand with repository Added CreateResultViewCommandHandler to process creation of ResultView entities using IRepository. Also updated using directives to include necessary repository and entity namespaces. --- .../ResultViews/Commands/CreateResultViewCommand.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ReC.Application/ResultViews/Commands/CreateResultViewCommand.cs b/src/ReC.Application/ResultViews/Commands/CreateResultViewCommand.cs index 6036cef..b9d625c 100644 --- a/src/ReC.Application/ResultViews/Commands/CreateResultViewCommand.cs +++ b/src/ReC.Application/ResultViews/Commands/CreateResultViewCommand.cs @@ -1,5 +1,7 @@ -using MediatR; +using DigitalData.Core.Abstraction.Application.Repository; +using MediatR; using ReC.Application.Common.Interfaces; +using ReC.Domain.Entities; using System.Text.Json.Serialization; namespace ReC.Application.ResultViews.Commands; @@ -16,4 +18,9 @@ public class CreateResultViewCommand : IAuthScoped, IRequest [JsonIgnore] public AuthScope Scope { get; } = new(); +} + +public class CreateResultViewCommandHandler(IRepository repo) : IRequestHandler +{ + public Task Handle(CreateResultViewCommand request, CancellationToken cancel) => repo.CreateAsync(request, cancel); } \ No newline at end of file