有人可以解释使用什么路径Paralle.Invoke
或Parallel.ForEach
在这种情况下:
- query large data from database let's say 1000 records
- parallel process this data, save the records back to db, eventually insert new records etc
所以数据将像列表一样返回,然后我有特定的方法将根据类别属性处理列表中的某些记录。
我应该使用什么:.ForEach 或 .Invoke?