public virtual void Raise(Aggregate source, Event @event) { if (source != null && AggregateTracker[source].Lifestate == AggregateLifestate.Building) return; TransactionTracker[Transaction.Current].RecordEvent(new RaisedEvent(@event, DateTimeOffset.UtcNow)); }
public void Save(Aggregate game) { this.context.Events.AddRange(game.UncomittedEvents); this.context.SaveChanges(); }