using MediatR; using Modules.Library.Application.Gateways; namespace Modules.Library.Application.Commands.Anime.Title.Properties.Preview; public class DeletePreviewCommand : IRequest { public Guid TitleId { get; set; } } public class DeletePreviewCommandHandler(IAnimeTitleGateway titleGateway) : IRequestHandler { public async Task Handle(DeletePreviewCommand request, CancellationToken cancellationToken) { var title = await titleGateway.GetById(request.TitleId); title.CommonProperties.DeletePreview(); await titleGateway.Update(title); return Unit.Value; } }