Ejemplo n.º 1
0
        public IActionResult GetOrdersBy(string by)
        {
            switch (by)
            {
            case GetOrderBy.NOT_SERVED_ORDERS:
                return(View("NotServedOrders", orderRep.GetNotServedOrders()));

            case GetOrderBy.NOT_DELIVERED_ORDERS:
                return(View("NotDeliveredOrders", orderRep.GetNotDeliveredOrders()));

            case GetOrderBy.DELIVERED_ORDERS:
                return(View("DeliveredOrders", orderRep.GetDeliveredOrders()));

            default:
                return(BadRequest());
            }
        }