Exemplo n.º 1
0
        public IEnumerable <OrderDetail> GetOrderDetailByOrderID(int page, Guid id, int pageSize, out int totalRow)
        {
            var query = _orderDetailRepository.GetMulti(x => x.OrderID == id, new string[] { "Product" });

            totalRow = query.Count();
            return(query.Skip((page - 1) * pageSize).Take(pageSize));
        }
Exemplo n.º 2
0
 public IEnumerable <OrderDetail> GetAll(string keyword)
 {
     if (string.IsNullOrEmpty(keyword))
     {
         return(_orderDetailRepository.GetAll());
     }
     return(_orderDetailRepository.GetMulti(x => x.OrderID.ToString().Contains(keyword)));
 }
Exemplo n.º 3
0
 public IEnumerable <OrderDetail> GetAll(string keyword)
 {
     if (string.IsNullOrEmpty(keyword))
     {
         return(_orderDetailRepository.GetAll());
     }
     else
     {
         return(_orderDetailRepository.GetMulti(x => x.Product.ProductName.Contains(keyword)));
     }
 }
Exemplo n.º 4
0
 public List <OrderDetail> GetOrderDetails(int orderId)
 {
     return(_orderDetailRepository.GetMulti(x => x.OrderID == orderId, new string[] { "Order", "Color", "Size", "Product" }).ToList());
 }
Exemplo n.º 5
0
 public IEnumerable <OrderDetail> GetByOrderId(int id)
 {
     return(_orderDetailRepository.GetMulti(t => t.OrderId == id, new string[] { "Product" }));
 }
Exemplo n.º 6
0
 public IEnumerable <OrderDetail> GetListdetailByOrderId(int id)
 {
     return(_orderDetailRepository.GetMulti(x => x.OrderID == id));
 }