public async Task <IReadOnlyList <Order> > GetOrdersForUserAsync(string buyerEmail) { var spec = new OrdersWithItemsAndOrderingSpec(buyerEmail); return(await _unitOfWork.Repository <Order>().ListAsync(spec)); }
public async Task <Order> GetOrderByIdAsync(int id, string buyerEmail) { var spec = new OrdersWithItemsAndOrderingSpec(id, buyerEmail); return(await _unitOfWork.Repository <Order>().GetEntityWithSpec(spec)); }