public Task Store(IEnumerable <IDomainEvent> events)
        {
            foreach (var @event in events)
            {
                if (@event.UserContext == null)
                {
                    @event.SetUserContext(_userContext);
                }
            }
            var aggregateDetail = events.First();

            return(_domainStore.SaveAsync(aggregateDetail.AggregateRootId, events));
        }
示例#2
0
 public Task SaveAsync(T aggregate)
 {
     return(_domainStore.SaveAsync(aggregate.Id, aggregate.Events));
 }
示例#3
0
 /// <inheritdoc />
 public async Task SaveAsync(T aggregate)
 {
     await _domainStore.SaveAsync(typeof(T), aggregate.Id, null, aggregate.Events);
 }
示例#4
0
 public async Task SaveAsync(T aggregate)
 {
     await _domainStore.SaveAsync(aggregate.Id, aggregate.Events);
 }