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