


CodePudding user response:
Viewbag. Order this step, what do you look at the data sources have been the first, add a firstordefault behind the where is the object of tolist collection,CodePudding user response:
The order does not exist, check, you ViewTag properties,CodePudding user response:
Your Orders. Where the returned is not a single object,CodePudding user response:
Upstairs positive solution, change the where clause to under FirstOrDefault is a single object, where the returned is setCodePudding user response:
Upstairs is@ viewBag. Order [0]. OrderNumber
CodePudding user response:
Incredibly don't return to the view of the model, and use ViewBag directly, why want to?Have you ever seen your what kind of the return value is the Where?