diff --git a/src/SimpleCqrs/Domain/DomainRepository.cs b/src/SimpleCqrs/Domain/DomainRepository.cs index e1d93e8..5972229 100644 --- a/src/SimpleCqrs/Domain/DomainRepository.cs +++ b/src/SimpleCqrs/Domain/DomainRepository.cs @@ -17,7 +17,7 @@ public DomainRepository(IEventStore eventStore, ISnapshotStore snapshotStore, IE this.eventBus = eventBus; } - public TAggregateRoot GetById(Guid aggregateRootId) where TAggregateRoot : AggregateRoot, new() + public virtual TAggregateRoot GetById(Guid aggregateRootId) where TAggregateRoot : AggregateRoot, new() { var aggregateRoot = new TAggregateRoot(); var snapshot = GetSnapshotFromSnapshotStore(aggregateRootId); @@ -34,7 +34,7 @@ public TAggregateRoot GetById(Guid aggregateRootId) where TAggre return aggregateRoot; } - public void Save(AggregateRoot aggregateRoot) + public virtual void Save(AggregateRoot aggregateRoot) { var domainEvents = aggregateRoot.UncommittedEvents;