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)); }
public Task SaveAsync(T aggregate) { return(_domainStore.SaveAsync(aggregate.Id, aggregate.Events)); }
/// <inheritdoc /> public async Task SaveAsync(T aggregate) { await _domainStore.SaveAsync(typeof(T), aggregate.Id, null, aggregate.Events); }
public async Task SaveAsync(T aggregate) { await _domainStore.SaveAsync(aggregate.Id, aggregate.Events); }