public ActionResult HaberListele() { if (Session["kullaniciAdi"] == null) { return(RedirectToAction("Giris", "Login")); } List <haber> haberList = haberRepository.Listele(); return(View(haberList)); }
public ActionResult Index() { List <calısan> calisanList = new List <calısan>(); List <proje> projeList = new List <proje>(); List <haber> haberList = new List <haber>(); List <slider> sliderList = new List <slider>(); List <mesaj> mesajList = new List <mesaj>(); calisanList = calısanRepository.Listele(); ViewBag.calisanListem = calisanList; projeList = projeRepository.Listele(); ViewBag.projeListem = projeList; haberList = haberRepository.Listele(); ViewBag.haberListem = haberList; sliderList = sliderRepository.Listele(); ViewBag.sliderListem = sliderList; return(View()); }