public JsonResult BlogSil(int id) { BlogRep rep = new BlogRep(); rep.Delete(id); return(Json("Kayıt Başarıyla Silindi.")); }
// 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)); }
public ActionResult Detail(int id) { BlogRep rep = new BlogRep(); var blog = rep.GetById(id); blog.GoruntulenmeSayisi++; ViewBag.tags = blog.Etiket; rep.Update(blog); return(View(blog)); }
// 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 GrupModel GetUserById(string id) { BlogRep rep = new BlogRep(); var user = rep.GetAllUser().FirstOrDefault(x => x.Id == id); GrupModel model = new GrupModel(); model.GrupAdi = user.GrupAdi; model.GrupUyeleri = user.GrupUyeleri; model.GrupAciklama = user.Aciklama; model.KurulusTarihi = user.KurulusTarihi; return(model); }
public List <GrupModel> GetAllUsers() { BlogRep rep = new BlogRep(); return(rep.GetAllUser().Where(x => x.GrupAdi != "Admin").Select(x => new GrupModel { GrupAdi = x.GrupAdi, GrupUyeleri = x.GrupUyeleri, GrupAciklama = x.Aciklama, KurulusTarihi = x.KurulusTarihi }).ToList()); }
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 Blog GetBlogById(int id) { BlogRep rep = new BlogRep(); return(rep.GetById(id)); }
public List <Blog> GetAllBlogs() { BlogRep rep = new BlogRep(); return(rep.GetAll()); }