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