public ActionResult Common(string type, int page = 1, int pageSize = 20, string filter = null) { var data = commonServices.GetCommon(type, page, pageSize, filter); ViewBag.Title = data.CommonList.Count > 0 ? data.CommonList.FirstOrDefault().Description : type; ViewBag.Page = data.CommonList.Count > 0 ? data.CommonList.FirstOrDefault().Code : type; return(View(data)); }