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