public IActionResult EditModel(string TempName, string TempTable, string TempType, string ModelOrgId, string JsonData, string ModelIndex) { string urlContentPath = @"\Content\" + ModelOrgId + @"\" + TempName + ".xml"; var modeltemp = new ModelTempDto() { TempName = TempName, TempTable = TempTable, ModelOrgId = ModelOrgId, TempType = TempType, Id = ModelIndex, ContentPath = urlContentPath }; string urlPath = _hostEnvironment.WebRootPath; urlContentPath = urlPath + urlContentPath; List <ModelEntityDto> listDto = JsonConvert.DeserializeObject <List <ModelEntityDto> >(JsonData); OtherHelper.CreateListXml <ModelEntityDto>(urlContentPath, listDto); _tempService.Add(modeltemp); List <ModelEntityDto> list = OtherHelper.SerialierList <ModelEntityDto>(urlContentPath); return(Json(new JsonResult <string> { msg = "模板保存成功!", flag = true })); }