在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1 public class Para_list //实体类 2 { 3 public long ParemeterID { get; set; } 4 public string Name { get; set; } 5 public string Scope { get; set; } 6 public string Require { get; set; } 7 public string Basis { get; set; } 8 public string ParemeterResult { get; set; } 9 }
1 List<Para_list> paramentitys = JsonHelper.DeserializeJsonToObject<List<Para_list>>(Parameters); 2 if (!string.IsNullOrWhiteSpace(Parameters)) 3 { 4 for (int i = 0; i < paramentitys.Count; i++) 5 { 6 long checkID = paramentitys[i].ParemeterID; 7 var ResultQuery = dbContext.checkresult.Where(o => o.ID == checkID).FirstOrDefault(); 8 ResultQuery.Result = paramentitys[i].ParemeterResult; 9 dbContext.SaveChanges(); 10 } 11 }
|
请发表评论