public ShoppingCartReadModel(ShoppingCartReadModel cart)
     : this(cart.Id, cart.CustomerId)
 {
 }
Beispiel #2
0
 public async Task SaveAsync(ShoppingCartReadModel cart)
 {
     await _store.SaveAsync(cart);
 }
 public ShoppingCartReadModel(ShoppingCartReadModel cart, IEnumerable <ShoppingCartItemReadModel> items)
     : this(cart.Id, cart.CustomerId, items)
 {
 }
Beispiel #4
0
 public async Task HandleAsync(CartCreated @event)
 {
     var newCart = new ShoppingCartReadModel(@event.AggregateId, @event.CustomerId);
     await _repository.SaveAsync(newCart);
 }