I have query with AsParallel().ForAll is sometimes skipping some records and sometimes returning null records in my case.
I am not sure for this is the exact reason for this. Is the mechanism for parellal for in .Net reliable?
Edit: Sample code
var collection=.. Collection from database
var processedCollection=...
collection.Where(h => h.Id == id).AsParallel().ForAll(h =>
{
var processedCollectionItem = ....logic to process the item
processedCollectionItem.Where(c=>c.....).AsParallel().ForAll(c =>
{
//logic to process the records
});
processedCollection.Add(processedCollectionItem);
});