Add handler for CreateResultViewCommand with repository

Added CreateResultViewCommandHandler to process creation of ResultView entities using IRepository<ResultView>. Also updated using directives to include necessary repository and entity namespaces.
This commit is contained in:
2025-12-17 11:55:23 +01:00
parent 1199c61ae8
commit 48e9812224

View File

@@ -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<ResultView> repo) : IRequestHandler<CreateResultViewCommand>
{
public Task Handle(CreateResultViewCommand request, CancellationToken cancel) => repo.CreateAsync(request, cancel);
}