예제 #1
0
        /// <summary>
        /// 文章专栏页
        /// </summary>
        /// <param name="cid">栏目id</param>
        /// <param name="tid">标签id</param>
        /// <returns></returns>
        public IActionResult List(string cid, string tid)
        {
            string name = "";

            if (!string.IsNullOrWhiteSpace(cid))
            {
                name = _categoryInfoService.FindEntity(c => c.EnabledMark == true && c.CategoryId == cid)?.CategoryName;
            }
            if (!string.IsNullOrWhiteSpace(tid))
            {
                name = _tagsInfoService.FindEntity(c => c.EnabledMark == true && c.TagId == tid)?.TagName;
            }
            ViewBag.CategoryName = name;
            return(View());
        }
예제 #2
0
 public IActionResult Detail(string key)
 {
     return Json(_tagsInfoService.FindEntity(c => c.TagId == key));
 }