public IActionResult Index(int?id) { if (id == null) { return(View(repostory.GetAll())); } else { return(View(repostory.GetAll().Where(p => p.CategoryId == id))); } }
public IActionResult Index() { var bloglar = blogRepository.GetAll().Where(p => p.isHome == true); return(View(bloglar)); }