Example #1
0
        public async Task <IReadOnlyList <Order> > GetOrdersForUserAsync(string buyerEmail)
        {
            var spec = new OrderesWithItemsAndOrderingSpecification(buyerEmail);

            return(await _unitOfWork.Repository <Order>().ListAsync(spec));
        }
Example #2
0
        public async Task <Order> GetOrderByIdAsync(int id, string buyerEmail)
        {
            var spec = new OrderesWithItemsAndOrderingSpecification(id, buyerEmail);

            return(await _unitOfWork.Repository <Order>().GetEntityWithSpec(spec));
        }