public void Handle(MetadataDefinitionRegexChangedEvent @event) { if (!_repository.Exists(@event.AggregateIdentity)) { throw new AggregateNotFoundException(); } _repository.Update(from p in _repository.Get(@event.AggregateIdentity) select p.WithNewRegularExpression(@event.Regex)); }
public void Handle(MetadataDefinitionRegexChangedEvent @event) { _repository.Update(from projection in _repository.Get(@event.AggregateIdentity) select projection.WithNewRegularExpression(@event.Regex)); }