Files
DbFirst/DbFirst.Application/Catalogs/Commands/DeleteCatalogHandler.cs
OlgunR 17fdb6ed51 Move repository interfaces to Application layer
Refactored IRepository<T> and ICatalogRepository to reside in the DbFirst.Application layer instead of Domain. Updated namespaces, using statements, and all references in services and handlers. Adjusted csproj dependencies to reflect the new structure. Updated comments to clarify Clean Architecture rationale and improved separation of concerns.
2026-01-19 16:42:48 +01:00

20 lines
545 B
C#

using DbFirst.Application.Repositories;
using MediatR;
namespace DbFirst.Application.Catalogs.Commands;
public class DeleteCatalogHandler : IRequestHandler<DeleteCatalogCommand, bool>
{
private readonly ICatalogRepository _repository;
public DeleteCatalogHandler(ICatalogRepository repository)
{
_repository = repository;
}
public async Task<bool> Handle(DeleteCatalogCommand request, CancellationToken cancellationToken)
{
return await _repository.DeleteAsync(request.Id, cancellationToken);
}
}