private void Apply(ClientCreated obj) { this.ID = obj.ID; Name = obj.Name; balance = 0; }
private void Handle(ClientCreated evt) { var ci = indexer.Get<ClientInformation>(evt.ID); ClientInformation clientInfo; if(ci==null) clientInfo = new ClientInformation() { ID=evt.ID, Name=evt.Name, Balance=0 }; else { clientInfo = ci; clientInfo.Balance = 0; clientInfo.Name = evt.Name; } indexer.Index(clientInfo); }