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