using Application.Abstractions.Data;
using MediatR;
using Microsoft.EntityFrameworkCore;

namespace Application.Features.Member.Wallet.Transactions.Delete;

public sealed class Handler(IAppDbContext db) : IRequestHandler<Command>
{
    public async Task Handle(Command request, CancellationToken ct)
    {
        await db.WalletTransaction.Where(x => request.IDs.Contains(x.ID)).ExecuteDeleteAsync(ct);
    }
}