Ejemplo n.º 1
0
        public async Task <Order[]> GetOrdersForUserAsync(string buyerEmail)
        {
            var spec = new OrdersForBuyerSpec(buyerEmail);

            return(await _repoUnitOfWork.Repository <Order>().GetEntitiesAsync(spec));
        }
Ejemplo n.º 2
0
        public async Task <Order> GetOrderByIdAsync(int id, string buyerEmail)
        {
            var spec = new OrdersForBuyerSpec(id, buyerEmail);

            return(await _repoUnitOfWork.Repository <Order>().GetEntityAsync(spec));
        }