public IActionResult Index(string key) { List <Blog> list = null; if (key == null) { list = bodal.GetList(" sort = 0 ORDER BY createdate DESC"); } else { list = bodal.GetList(" title like '%" + key + "%' ORDER BY createdate DESC"); } ViewBag.djlist = bodal.GetTopRanList(4, ""); ViewBag.calist = cadal.GetTopList(4, " pbh = 0 ORDER BY caname"); return(View(list)); }
public IActionResult Index() { List <Blog> list = bodal.GetList(""); return(View(list)); }