Example #1
0
        public async Task <IActionResult> GetOrderDetails()
        {
            var list = await _order.GetAllOrders();

            var result = mapOrderDetails(list);

            return(Ok(JsonSerializer.Serialize(result)));
        }
 public IActionResult GetAllOrders()
 {
     try
     {
         List <OrderModel> orders = logic.GetAllOrders();
         return(Ok(orders));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }
Example #3
0
 public List <OrderDTO> GetAllOrders()
 {
     return(OM.GetAllOrders());
 }
Example #4
0
        // GET: Order
        public ActionResult IndexOrder()
        {
            List <Order> orders = orderLogic.GetAllOrders();

            return(View(orders));
        }