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);
 }
示例#5
0
        public void Update(UpdateCompanyCommand command)
        {
            Name = command.Name;

            AppliedEvents.Add(new CompanyUpdatedEvent(this, command.MessageId));
        }
示例#6
0
 public void Delete(DeleteCompanyCommand command)
 {
     AppliedEvents.Add(new CompanyDeletedEvent(this, command.MessageId));
 }
示例#7
0
        public void Update(UpdatePersonaCommand command)
        {
            Name = command.Name;

            AppliedEvents.Add(new PersonaUpdatedEvent(this, command.MessageId));
        }
示例#8
0
 public void Delete(DeletePersonaCommand command)
 {
     AppliedEvents.Add(new PersonaDeletedEvent(this, command.MessageId));
 }