private void Handle(CustomerMarkedAsPreferred evt) { var customer = _indexer.Get <Customer>(evt.Id); customer.IsPreferred = true; customer.Discount = evt.Discount; _indexer.Index(customer); _graphClient.Cypher .Match("(c:Customer)") .Where((Customer c) => c.Id == customer.Id) .Set("c = {c}") .WithParam("c", customer) .ExecuteWithoutResults(); }
private void Handle(CustomerMarkedAsPreferred evt) { var customer = _indexer.Get<Customer>(evt.Id); customer.IsPreferred = true; customer.Discount = evt.Discount; _indexer.Index(customer); _graphClient.Cypher .Match("(c:Customer)") .Where((Customer c) => c.Id == customer.Id) .Set("c = {c}") .WithParam("c", customer) .ExecuteWithoutResults(); }
private void Apply(CustomerMarkedAsPreferred obj) { Discount = obj.Discount; }
public void Apply(CustomerMarkedAsPreferred obj) { this.Discount = obj.Discount; }