C# 批量插入集合
public virtual void BtachImport(List<CamPaignliable> list)
{
try
{
this.BeginTransaction();
if (list.Count > 0)
{
for (int i = 0; i < list.Count; i++)
{
this.InterInsert(list[i]);//insert方法
}
}
this.CommitTransaction();
}
catch (Exception ex)
{
this.RollBackTransaction();
throw ex;
}
}

浙公网安备 33010602011771号