public void Activate()
        {
            if (!_isActive)
            {
                var priceListItemActivatedEvent = new PriceListItemActivatedDomainEvent(this.Id);

                this.Apply(priceListItemActivatedEvent);
                this.AddDomainEvent(priceListItemActivatedEvent);
            }
        }
 private async Task When(PriceListItemActivatedDomainEvent @event)
 {
     await _connection.ExecuteScalarAsync(
         "UPDATE payments.PriceListItems " +
         "SET [IsActive] = 'true' " +
         "WHERE [Id] = @PriceListItemId",
         new
     {
         @event.PriceListItemId
     });
 }
 private void When(PriceListItemActivatedDomainEvent @event)
 {
     this._isActive = true;
 }