public async Task <IActionResult> LoadAcByAcId(int aid) { var result = await _article.GetAcByAcid(aid); //不允许循环序列化 var setting = new JsonSerializerSettings(); setting.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; return(Json(result, setting)); }
public async Task <IActionResult> SelectArticle(int id) { var acdata = await _article.GetAcByAcid(id); ViewData["ModelId"] = acdata.WZZModel.id; if (acdata.id == 0) { return(NotFound()); } await VisitUser(id); return(View("Index_Article", acdata)); }