Ejemplo n.º 1
0
 public async Task<IReadOnlyList<Order>> GetOrdersForUserAsync(string buyerEmail)
 {
     var spec = new OrdersWithItemsAndSortingSpecification(buyerEmail);
     return await this.unitOfWork.Repository<Order>().ListAsync(spec);
 }
Ejemplo n.º 2
0
 public async Task<Order> GetOrderByIdAsync(int id, string buyerEmail)
 {
     var spec = new OrdersWithItemsAndSortingSpecification(id, buyerEmail);
     return await this.unitOfWork.Repository<Order>().GetEntityWithSpec(spec);
 }