public override string ToString() { return($"{this.EntityId}({AppliedEvents.Count()} event(s))"); }
protected void Apply(IEventMessage <TestEvent1> ev) { AppliedEvents.Add(ev); }
protected async Task Apply(IEventMessage <TestEvent2> ev) { AppliedEvents.Add(ev); }
public virtual void Apply(IEventMessage <TestEvent2> ev, Guid aggregateId) { AppliedEvents.Add(ev); }
public void Update(UpdateCompanyCommand command) { Name = command.Name; AppliedEvents.Add(new CompanyUpdatedEvent(this, command.MessageId)); }
public void Delete(DeleteCompanyCommand command) { AppliedEvents.Add(new CompanyDeletedEvent(this, command.MessageId)); }
public void Update(UpdatePersonaCommand command) { Name = command.Name; AppliedEvents.Add(new PersonaUpdatedEvent(this, command.MessageId)); }
public void Delete(DeletePersonaCommand command) { AppliedEvents.Add(new PersonaDeletedEvent(this, command.MessageId)); }