public override string ToString()
 {
     return($"{this.EntityId}({AppliedEvents.Count()} event(s))");
 }
Пример #2
0
 protected void Apply(IEventMessage <TestEvent1> ev)
 {
     AppliedEvents.Add(ev);
 }
Пример #3
0
 protected async Task Apply(IEventMessage <TestEvent2> ev)
 {
     AppliedEvents.Add(ev);
 }
Пример #4
0
 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));
 }