コード例 #1
0
 public void Handle(OrderItemAmountUpdated evnt)
 {
     _connection.Update(
         new { Amount = evnt.Amount },
         new { OrderId = evnt.OrderId, ProductId = evnt.ProductId },
         "eventsourcing_sample_orderitem",
         _transaction);
 }
コード例 #2
0
 protected virtual void Handle(OrderItemAmountUpdated evnt)
 {
     var orderItem = _entityManager.GetSingle<OrderItemEntity>(new { OrderId = evnt.OrderId, ProductId = evnt.ProductId });
     _entityManager.UpdateAndSave<OrderItemAmountUpdated>(orderItem, evnt, x => x.Amount);
 }
コード例 #3
0
        protected virtual void Handle(OrderItemAmountUpdated evnt)
        {
            var orderItem = _entityManager.GetSingle <OrderItemEntity>(new { OrderId = evnt.OrderId, ProductId = evnt.ProductId });

            _entityManager.UpdateAndSave <OrderItemAmountUpdated>(orderItem, evnt, x => x.Amount);
        }