标签:options name nec nmap mapping ota tab cti write
using (SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(da.Connection as SqlConnection, SqlBulkCopyOptions.Default, tran as SqlTransaction))
{
sqlbulkcopy.BatchSize = entityList.Count;
sqlbulkcopy.DestinationTableName = TableName;
DataTable rightsTable = entityList.ToTable();
for (int i = 0; i < rightsTable.Columns.Count; i++)
{
sqlbulkcopy.ColumnMappings.Add(rightsTable.Columns[i].ColumnName, rightsTable.Columns[i].ColumnName);
}
sqlbulkcopy.WriteToServer(rightsTable);
}
标签:options name nec nmap mapping ota tab cti write
原文地址:http://www.cnblogs.com/ccmsalome/p/7235410.html