public ActionResult Index() { ViewBag.Message = "Your application description page."; ProduktBLL produkt = new ProduktBLL(); return View("index", produkt.hentAlle()); }
// GET: Produkter public ActionResult Index() { if (Session["Rolle"] == null || Session["Rolle"].ToString() != "admin") { RedirectToAction("Index", "Home"); } ProduktBLL produkt = new ProduktBLL(); return View("index", produkt.hentAlle()); }