Refactored DTO class and namespace names from Massdata* to MassData* in DbFirst.Contracts. Updated all relevant application files to use the correct DTO namespaces for Catalogs and MassData. Adjusted _Imports.razor to include new DTO namespaces and removed unused usings. These changes improve code consistency and reduce namespace-related errors.
21 lines
579 B
C#
21 lines
579 B
C#
using DbFirst.Application.Repositories;
|
|
using MediatR;
|
|
using DbFirst.Contracts.Catalogs;
|
|
|
|
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);
|
|
}
|
|
}
|