Tag Archives: Parallel.Foreach

Convert a foreach loop to Parallel.Foreach loop

It is not hard to turn a serial foreach loop to a parallel foreach loop. The serial loop built with entity framework looks like this: //Serial NORTHWNDEntities ctx = new NORTHWNDEntities();   var result = from r in ctx.Products select … Continue reading

Posted in .Net | Tagged , , | Leave a comment