示例#1
0
        public async Task <IReadOnlyList <Order> > GetOrdersByUserNameAsync(string userName)
        {
            OrderWithItemsAndOrederingSpecification spec = new OrderWithItemsAndOrederingSpecification(userName);

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

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