private async Task UpdateCustomerOverview(Order order, CustomerProjection projection)
        {
            var existingOrder = projection.orders.FirstOrDefault(x => x.orderNumber == order.orderNumber);

            if (existingOrder is null)
            {
                ++projection.count;
                projection.orders.Add(new OrdersDetails
                {
                    articles    = order.articles,
                    orderNumber = order.orderNumber,
                    orderStatus = order.orderStatus
                });
            }
            else
            {
                existingOrder.orderStatus = order.orderStatus;

                if (order.articles != null)
                {
                    existingOrder.articles = order.articles;
                }
            }

            await _customerViewRepository.UpdateDocument(projection);
        }
        private async Task CreateCustomerOverview(Order order, string customerId)
        {
            var overview = new CustomerProjection
            {
                count      = 1,
                customerId = customerId,
                orders     = new List <OrdersDetails>
                {
                    new OrdersDetails
                    {
                        articles    = order.articles,
                        orderNumber = order.orderNumber,
                        orderStatus = order.orderStatus
                    }
                }
            };

            await _customerViewRepository.CreateDocument(overview);
        }