public void PreliminaryAccepted(CallForSpeech cc) { var c = new CallForSpeechPreliminaryAcceptedEvent (cc.Speaker, cc.Speech, cc.Registration, cc.Number, cc.Category, cc.Status, cc.ScoreResult, cc.PreliminaryDecision, cc.FinalDecision, cc.UniqueId, cc.Version); this.Key = c.UniqueId.GetAggregateKey(); ApplyChange(c); }
public async override Task <ExecutionStatus> HandleEvent(DomainEvent @event) { CallForSpeechPreliminaryAcceptedEvent callForSpeechRejectedEvent = @event as CallForSpeechPreliminaryAcceptedEvent; var cfs = _mapper.Map <CallForSpeech>(callForSpeechRejectedEvent); var execution = await _ZEsCallForSpeechRepository .SavePreliminaryAcceptenceAsync (cfs.UniqueId, cfs.PreliminaryDecision.DecisionBy, cfs.Status); return(execution); }
private void Apply(CallForSpeechPreliminaryAcceptedEvent e) { Speaker = e.Speaker; Speech = e.Speech; Registration = e.Registration; Number = e.Number; Category = e.Category; Status = e.Status; PreliminaryDecision = e.PreliminaryDecision; FinalDecision = e.FinalDecision; UniqueId = e.UniqueId; Version = e.Version++; ScoreResult = e.ScoreResult; this.Key = e.UniqueId.GetAggregateKey(); }