Refactor DeleteRecActionsCommand to use RecAction entity

Switched from using RecActionDto to RecAction entity in the
DeleteRecActionsCommandHandler and updated repository types
and using statements accordingly. This aligns the handler
with domain-driven design and improves consistency.
This commit is contained in:
2025-12-15 13:24:11 +01:00
parent 679c065aaa
commit 289b6109e4

View File

@@ -2,7 +2,7 @@
using DigitalData.Core.Exceptions; using DigitalData.Core.Exceptions;
using MediatR; using MediatR;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using ReC.Application.Common.Dto; using ReC.Domain.Entities;
namespace ReC.Application.RecActions.Commands; namespace ReC.Application.RecActions.Commands;
@@ -11,7 +11,7 @@ public class DeleteRecActionsCommand : IRequest
public required long ProfileId { get; init; } public required long ProfileId { get; init; }
} }
public class DeleteRecActionsCommandHandler(IRepository<RecActionDto> repo) : IRequestHandler<DeleteRecActionsCommand> public class DeleteRecActionsCommandHandler(IRepository<RecAction> repo) : IRequestHandler<DeleteRecActionsCommand>
{ {
public async Task Handle(DeleteRecActionsCommand request, CancellationToken cancel) public async Task Handle(DeleteRecActionsCommand request, CancellationToken cancel)
{ {