DbConnection conn = ((IObjectContextAdapter)_dbContextFactory.GetCurrentThreadInstance()).ObjectContext.Connection;
conn.Open();var tran = conn.BeginTransaction();
_db.BulkInsert<T>(entities,tran );發(fā)生以下錯(cuò)誤:System.Data.Entity.Core.EntityClient.EntityTransaction”的對(duì)象強(qiáng)制轉(zhuǎn)換為類型“System.Data.SqlClient.SqlTransaction請(qǐng)問(wèn)如何使用EntityFramework.BulkInsert如何使用事務(wù)?
EntityFramework.BulkInsert使用事務(wù)
慕斯王
2018-08-01 07:10:38