用Dapper.dll
using Dapper; using System.Data.SQLite; using System.Data; List<FlightJson2> FJ = new List<FlightJson2>(); FlightJson2 flightJson = JsonConvert.DeserializeObject<FlightJson2>(row["flight_json"].ToString()); flightJson.FJ="AAA"; flightJson.PSSJ="AAA"; flightJson.PSJD="AAA"; flightJson.FJMC="AAA"; FJ.Add(flightJson); using (IDbConnection connection = new SQLiteConnection(conn)) { connection.Execute("update FJ set PSSJ=@PSSJ,PSJD=@PSJD,FJ=@FJ WHERE FJMC=@FJMC", FJ); }