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)); }
public IEnumerable <OrderDetail> GetAll(string keyword) { if (string.IsNullOrEmpty(keyword)) { return(_orderDetailRepository.GetAll()); } return(_orderDetailRepository.GetMulti(x => x.OrderID.ToString().Contains(keyword))); }
public IEnumerable <OrderDetail> GetAll(string keyword) { if (string.IsNullOrEmpty(keyword)) { return(_orderDetailRepository.GetAll()); } else { return(_orderDetailRepository.GetMulti(x => x.Product.ProductName.Contains(keyword))); } }
public List <OrderDetail> GetOrderDetails(int orderId) { return(_orderDetailRepository.GetMulti(x => x.OrderID == orderId, new string[] { "Order", "Color", "Size", "Product" }).ToList()); }
public IEnumerable <OrderDetail> GetByOrderId(int id) { return(_orderDetailRepository.GetMulti(t => t.OrderId == id, new string[] { "Product" })); }
public IEnumerable <OrderDetail> GetListdetailByOrderId(int id) { return(_orderDetailRepository.GetMulti(x => x.OrderID == id)); }