大数据量插入

用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);
                    }

猜你喜欢

转载自www.cnblogs.com/baimy/p/12703879.html