Esempio n. 1
0
        /// <summary>
        /// 取得 Orders by 條件
        /// </summary>
        /// <returns></returns>
        public IList <Order> GetOrders(OrderQueryArg arg)
        {
            CustomerService customerService = new CustomerService();

            OrdersDao orderDao = new OrdersDao();
            // 取得所有訂單後進行篩選  (注意: 此處應將查詢條件串入SQL中為較好之寫法)
            IEnumerable <Order> currentOrders = orderDao.GetOrdersByArg(arg);

            return(currentOrders.OrderBy(m => m.OrderID).ToList());
        }