Beispiel #1
0
        public async Task <IReadOnlyList <Order> > GetOrdersFromUserAsync(string buyerEmail)
        {
            var spec = new OrdersWithItemAndOrderingSpecification(buyerEmail);

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

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