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)); } }
public List <OrderDTO> GetAllOrders() { return(OM.GetAllOrders()); }
// GET: Order public ActionResult IndexOrder() { List <Order> orders = orderLogic.GetAllOrders(); return(View(orders)); }