Пример #1
0
        public ActionResult Busca(string termo)
        {
            IList <Post> posts = DAO.BuscaPeloTermo(termo);

            var vazio = false;

            if (posts.Count == 0)
            {
                vazio = true;
            }
            ViewBag.Vazio = vazio;

            return(View("Index", posts));
        }
Пример #2
0
        public IActionResult Busca(string termo)
        {
            IList <Post> termoBuscado = dao.BuscaPeloTermo(termo);

            return(View("Index", termoBuscado));
        }
        public IActionResult Busca(string termo)
        {
            IList <Post> posts = dao.BuscaPeloTermo(termo);

            return(View("Index", posts));
        }