Linq分批次,每组1000条

///
/// 分组插入每次插入1000
///
///
///
private List>> GroupResult((IList Columns, IList> Rows) data)
{
var rows = data.Rows;
var q = from e in rows.Select((item, index) => new { index, item })
group e by e.index / 1000
into g
select g.Select(e => e.item).ToList();
return q.ToList();
}

你可能感兴趣的:(Linq分批次,每组1000条)