public async Task <ActionResult> Details(int id) { ViewBag.Details = await details.GetAll(); var currentOrderDetails = await orderDetails.GetAllByOrderId(id); if (orderDetails != null) { return(View(currentOrderDetails)); } return(NotFound()); }