Ejemplo n.º 1
0
        public async Task <IReadOnlyList <Order> > GetOrdersForAppUserAsync(string customerEmail)
        {
            var specification = new SortedOrdersWithItemsSpecification(customerEmail);

            return(await _unitOfWork.Service <Order>().ListAllWithObjectsAsync(specification));
        }
Ejemplo n.º 2
0
        public async Task <Order> GetOrderByIdAsync(int orderId, string customerEmail)
        {
            var specification = new SortedOrdersWithItemsSpecification(orderId, customerEmail);

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