I had a method like that:
public async Task<IEnumerable<Model>> Get(string link)
{
MyRequestAsync request = new MyRequestAsync(link);
return await request.GetResult();
}
It is working pretty well.
Then I decided to change this one a little bit:
public async Task<IEnumerable<Model>> Get([FromUri]IList<string> links)
{
IList<Model> list = new List<Model>();
foreach (var link in links)
{
MyRequestAsync request = new MyRequestAsync(link);
list.Add(await request.GetResult());
}
return list;
}
And now I am got a problem, for some reason it is just not returning the result. For my understanding I am getting the deadlock.
Do you know how to fix that?