コード例 #1
0
        public async Task <IReadOnlyList <Order> > GetOrdersForAppUserAsync(string customerEmail)
        {
            var specification = new SortedOrdersWithItemsSpecification(customerEmail);

            return(await _unitOfWork.Service <Order>().ListAllWithObjectsAsync(specification));
        }
コード例 #2
0
        public async Task <Order> GetOrderByIdAsync(int orderId, string customerEmail)
        {
            var specification = new SortedOrdersWithItemsSpecification(orderId, customerEmail);

            return(await _unitOfWork.Service <Order>().GetByIdWithObjectsAsync(specification));
        }