/// <summary>
        /// 购物结账并产生销售订单。
        /// </summary>
        /// <param name="customerID">需要结账并生成订单的客户的全局唯一标识。</param>
        public SalesOrderDataObject Checkout(Guid customerID)
        {
            var user         = userRepository.GetByKey(customerID);
            var shoppingCart = shoppingCartRepository.FindShoppingCartByUser(user);

            var salesOrder = domainService.CreateSalesOrder(user, shoppingCart);

            return(Mapper.Map <SalesOrder, SalesOrderDataObject>(salesOrder));
        }