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)); }
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)); }