示例#1
0
        public async Task <IReadOnlyList <Order> > GetOrderForUserAsync(string buyerEmail)
        {
            var spec = new OrderWhitTypesAndOrderSpecification(buyerEmail);

            return(await _unitOfWork.Repository <Order>().ListAsync(spec));
        }
示例#2
0
        public async Task <Order> GetOrderByIdAsyc(int id, string buyerEmail)
        {
            var spec = new OrderWhitTypesAndOrderSpecification(id, buyerEmail);

            return(await _unitOfWork.Repository <Order>().GetEntityWithSpec(spec));
        }