private void Apply(JudgeUpdatedEvent e) { Version = e.Version++; Login = e.Login; Password = e.Password; Category = e.Category; Birthdate = e.Birthdate; UniqueId = e.UniqueId; Key = e.Key; }
public async override Task <ExecutionStatus> HandleEvent(DomainEvent @event) { JudgeUpdatedEvent categoryCreateEvent = @event as JudgeUpdatedEvent; var judge = _mapper.Map <Judge>(categoryCreateEvent); var execution = await _zEsJudgeRepository.UpdateByUniqueIdAsync(judge); return(execution); }
public void Update(Judge j) { var c = new JudgeUpdatedEvent(Birthdate, Category, UniqueId, Login, Password, Name, Version); c.Key = c.UniqueId.GetAggregateKey(); ApplyChange(c); }