public void Handle(CustomAttributeValueRemovedEvent @event) { try { EventStore.Save(@event); } catch { throw; } }
public async Task RemoveValueFromAttribute(Guid attributeId, object value) { try { var attribute = await Repository.GetByKeyAsync <CustomAttribute>(attributeId); attribute.RemoveValue(value); await Repository.SaveChangesAsync(); var @event = new CustomAttributeValueRemovedEvent(attributeId, value); EventBus.RaiseEvent(@event); } catch { throw; } }