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