Beispiel #1
0
        public void Handle(UpdatedEntityMetadataDefinitionValueEvent @event)
        {
            var currentValues = _readStore.ToQueryable()
                                .Where(x => x.EntityIdentity == @event.AggregateIdentity)
                                .Where(x => x.MetadataDefinitionIdentity == @event.DefinitionId)
                                .ToList();

            currentValues.Each(x => _readStore.Remove(x.ToMaybe())); // clear current values

            @event.Supplied.GetStream().Each(value => _readStore.Save(new EntityValueProjection(@event.AggregateIdentity, @event.DefinitionId, @event.Name.Name, @event.DataType.Tag, @event.Regex, value).ToMaybe()));
        }
 public void Handle(UpdatedEntityMetadataDefinitionValueEvent @event)
 {
     UpdateIndex(@event.AggregateIdentity);
 }