예제 #1
0
        public void Handle(MetadataDefinitionDeletedEvent @event)
        {
            var projections = (from projection in _repository.ToQueryable().Where(x => x.DefinitionId == @event.AggregateIdentity)
                               select projection)
                              .ToList();

            foreach (var projection in projections)
            {
                _repository.Remove(projection.ToMaybe());
            }
        }
예제 #2
0
        public void Handle(MetadataDefinitionDeletedEvent @event)
        {
            if (!_repository.Exists(@event.AggregateIdentity))
            {
                throw new AggregateNotFoundException();
            }

            var projection = _repository.Get(@event.AggregateIdentity);

            projection.Foreach(x => x.Delete());

            _repository.Update(projection);
        }
예제 #3
0
 public void Handle(MetadataDefinitionDeletedEvent @event)
 {
     //  _indexer.DeleteIndex(@event.AggregateIdentity);
 }
 public void Handle(MetadataDefinitionDeletedEvent @event)
 {
     _repository.Remove(from projection in _repository.Get(@event.AggregateIdentity) select projection);
 }