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