// GET: Blog public ActionResult Index() { BlogRep rep = new BlogRep(); var liste = rep.GetAll().OrderByDescending(x => x.EklenmeTarihi); return(View(liste)); }
public ActionResult tags(string id) { BlogRep rep = new BlogRep(); var liste = rep.GetAll().Where(x => x.Etiket.Contains(id)); ViewBag.tag = id; return(View(liste)); }
// GET: Admin/Admin public ActionResult Index() { TurlerRep rep = new TurlerRep(); YorumRep yRep = new YorumRep(); BlogRep bRep = new BlogRep(); ViewBag.YorumSayisi = yRep.GetAll().Count.ToString(); ViewBag.BlogSayisi = bRep.GetAll().Count.ToString(); ViewBag.TurSayisi = rep.GetAll().Count(x => x.TurAdi != "_silindi").ToString(); ViewBag.KullaniciSayisi = rep.GetAllUser().Count().ToString(); return(View()); }
public ActionResult BlogSonuclar() { BlogRep rep = new BlogRep(); var blogs = rep.GetAll(); List <Blog> liste = new List <Blog>(); foreach (var item in blogs) { if (item.Etiket.ToLower().Contains(Session["aranacak"].ToString()) || item.Baslik.ToLower().Contains(Session["aranacak"].ToString())) { liste.Add(item); } } return(View(liste)); }
// GET: Admin/Blog public ActionResult Index() { BlogRep rep = new BlogRep(); return(View(rep.GetAll())); }
public List <Blog> GetAllBlogs() { BlogRep rep = new BlogRep(); return(rep.GetAll()); }