In View-Controller mode, the responsibility of dispatchers is to pass the correct model before the view, depending on the action you invoke. With that in mind. You do not want to create a global list with BidModel.
MVC 3, dynamic ViewBag.
:
public ActionResult RetreiveAllBids()
{
var bids = BidRepository.GetAllBids();
ViewBag.Bids = bids.ToArray();
return View();
}
, LINQ-to-* , ORM/ . , List .
Edit
, , , , , , , :
, , , BidModel :
public IEnumerable<BidModel> Bids
{
get { return Session["Bids"] as IEnumerable<BidModel>; }
set { Session["Bids"] = value; }
}
, , // , .