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.
This commit is contained in:
parent
8624742eb3
commit
06af6dd43c
@ -1,5 +1,6 @@
|
|||||||
using DigitalData.Core.Abstraction.Application.Repository;
|
using DigitalData.Core.Abstraction.Application.Repository;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
using ReC.Domain.Entities;
|
||||||
|
|
||||||
namespace ReC.Application.OutResults.Commands;
|
namespace ReC.Application.OutResults.Commands;
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ public class CreateOutResCommand : IRequest
|
|||||||
public string? AddedWho { get; set; }
|
public string? AddedWho { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CreateOutResCommandHandler(IRepository<CreateOutResCommand> repo) : IRequestHandler<CreateOutResCommand>
|
public class CreateOutResCommandHandler(IRepository<OutRes> repo) : IRequestHandler<CreateOutResCommand>
|
||||||
{
|
{
|
||||||
public Task Handle(CreateOutResCommand request, CancellationToken cancel)
|
public Task Handle(CreateOutResCommand request, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user