Exemple #1
0
        // GET: Blog
        public ActionResult Index()
        {
            BlogRep rep   = new BlogRep();
            var     liste = rep.GetAll().OrderByDescending(x => x.EklenmeTarihi);

            return(View(liste));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        // 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());
        }
Exemple #4
0
        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()));
        }
Exemple #6
0
        public List <Blog> GetAllBlogs()
        {
            BlogRep rep = new BlogRep();

            return(rep.GetAll());
        }