Kannan1212
New member
- Joined
- Apr 11, 2020
- Messages
- 4
- Programming Experience
- 1-3
I am new to Parallel call in .Net core, please help me.
I am making Parallel call, so I would like to know here if any calls fails in If one of out of many calls fails or all calls failed then we should write to logs specific which Permanent ID got failed. Please help me how to Identify which one failed
I am making Parallel call, so I would like to know here if any calls fails in If one of out of many calls fails or all calls failed then we should write to logs specific which Permanent ID got failed. Please help me how to Identify which one failed
C#:
foreach (var permanentId in permanentIds)
{
Request1 request = new Request1 ()
{
AccountID = permanentId // "02134665300468820"
};
tasks.Add(ModelServiceProcessing(request).ContinueWith((TResult) => ServiceList.Add(TResult.Result)));
}
await Task.WhenAll(tasks.ToArray());
Last edited by a moderator: