public void Handle(CustomAttributeDescriptionChangedEvent @event) { try { EventStore.Save(@event); } catch { throw; } }
public async Task ChangeAttributeDescription(Guid attributeId, string description) { try { var attribute = await Repository.GetByKeyAsync <CustomAttribute>(attributeId); attribute.ChangeDescription(description); await Repository.SaveChangesAsync(); var @event = new CustomAttributeDescriptionChangedEvent(attributeId, description); EventBus.RaiseEvent(@event); } catch { throw; } }