public void Apply(DeletedProductImageEvent e) { Images.RemoveAll(x => x.ImageUrl.Contains(e.PublicId)); }
public async Task HandleAsync(DeletedProductImageEvent @event, CancellationToken cancellationToken = default) { await _repo.UpdateAsync(@event.AggregateId, x => x.Images.RemoveAll(o => o.ImageUrl.Contains(@event.PublicId)), cancellationToken); }