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


            return(View(bloglar));
        }