private void InsertData(IEnumerable<CopLogNegociosDetail> coplogDetailList) { var session = this.Repository.Session.SessionFactory.OpenStatelessSession(); session = session.SetBatchSize(150); ITransaction tx = session.BeginTransaction(IsolationLevel.Serializable); try { foreach (CopLogNegociosDetail copLogNegociosDetail in coplogDetailList) { session.Insert(copLogNegociosDetail); } } catch (Exception) { tx.Rollback(); throw; } tx.Commit(); session.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)