public ActionResult Details(int id) { if (id < 0) { return(NotFound()); } ; dynamic mymodel = new ExpandoObject(); mymodel.Order = _storeRepo.GetOrderById(id); mymodel.OrderDetails = _storeRepo.GetOrderDetails(id); return(View(mymodel)); }