public ActionResult Index(int?id) { ViewBag.Kategoriler = KategoriManager.GetAll(); List <Urun> urunler; if (id != null) { urunler = UrunManager.GetByKategori((int)id); } else { urunler = UrunManager.GetAll(); } return(View(urunler)); }