Watch this example on YouTube
to fix it convert function that loads view
replace
public ActionResult Test()
{
OrderClass model = new OrderClass();
model.or = db.SelectOrders().FirstOrDefault();
model.pr = db.SelectProducts();
return View(model);
}
with
public ActionResult Test()
{
OrderClass model = new OrderClass();
model.or = db.SelectOrders().FirstOrDefault();
model.pr = db.SelectProducts().ToList();
return View(model);
}
No comments:
Post a Comment