Example #1
0
        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();
        }
Example #2
0
        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();
        }
Example #3
0
 private void Apply(CustomerMarkedAsPreferred obj)
 {
     Discount = obj.Discount;
 }
Example #4
0
 private void Apply(CustomerMarkedAsPreferred obj)
 {
     Discount = obj.Discount;
 }
Example #5
0
 public void Apply(CustomerMarkedAsPreferred obj)
 {
     this.Discount = obj.Discount;
 }