Czesc mógłby ktoś mi napisać o co chodzi z tym fragmentem kodu?
Chodzi o parametr jaki przyjmuje kontroler Index i o linijkę
ViewBag.Library = id != null ? data[id.Value] : null;
static List<LibraryModel> data = new List<LibraryModel>()
// GET: Library
public ActionResult Index**(int? id = null)**
{
ViewBag.Data = data;
** ViewBag.Library = id != null ? data[id.Value] : null;**
return View("Index",data);
}