Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
 public IActionResult Detail(string key)
 {
     return(Json(_categoryInfoService.FindEntity(c => c.CategoryId == key)));
 }