Please let me know if I can run more than one Task.Factory.StartNew statement Task.Factory.StartNew parallel.
Something like that
var task = Task.Factory.StartNew<List<AccessDetails>>(() => this.GetAccessListOfMirror(mirrorId, null,"DEV")); var task1 = Task.Factory.StartNew<List<AccessDetails>>(() => this.GetAccessListOfMirror(mirrorId, null, "PROD"));
If so. how to get the output of the instruction and use it.
I used the instructions as shown below. where the application will wait while I get output from the stream.
var task = Task.Factory.StartNew<List<AccessDetails>>(() => this.GetAccessListOfMirror(mirrorId, null,"DEV")); return (List<AccessDetails>)task.ContinueWith(tsk => accdet = task.Result.ToList()).Result;
source share