/// <summary>批量插入 /// 批量插入 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="ts"></param> public void AddEx <T>(IEnumerable <T> ts) where T : class { using (SysDb <T> db = new SysDb <T>(strConn)) { db.BulkInsert(ts); } }
/// <summary>批量插入 /// 批量插入 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="ts"></param> public void AddBulkEx <T>(IEnumerable <T> ts) where T : class { var options = new BulkInsertOptions { EnableStreaming = true, }; using (SysDb <T> db = new SysDb <T>(strConn)) { db.BulkInsert(ts); } }