コード例 #1
0
        public async Task <IAggregateRoot> RestoreFromSnapshotAsync(Type aggregateRootType, string aggregateRootId)
        {
            var aggregateRepository = _aggregateRepositoryProvider.GetRepository(aggregateRootType);

            if (aggregateRepository != null)
            {
                return(await TryGetAggregateAsync(aggregateRepository, aggregateRootType, aggregateRootId, 0, new TaskCompletionSource <IAggregateRoot>()).ConfigureAwait(false));
            }
            return(null);
        }
コード例 #2
0
        public async Task <IAggregateRoot> RestoreFromSnapshotAsync(Type aggregateRootType, string aggregateRootId)
        {
            var aggregateRepository = _aggregateRepositoryProvider.GetRepository(aggregateRootType);

            if (aggregateRepository != null)
            {
                return(await aggregateRepository.GetAsync(aggregateRootId).ConfigureAwait(false));
            }
            return(null);
        }
コード例 #3
0
        public IAggregateRoot RestoreFromSnapshot(Type aggregateRootType, string aggregateRootId)
        {
            var aggregateRepository = _aggregateRepositoryProvider.GetRepository(aggregateRootType);

            if (aggregateRepository != null)
            {
                return(aggregateRepository.Get(aggregateRootId));
            }
            return(null);
        }