Trying to use the await
keyword in a LINQ
query and I get this:
The 'await' operator may only be used in a query expression within the first collection expression of the initial 'from' clause or within the collection expression of a 'join' clause
Sample Code:
var data = (from id in ids
let d = await LoadDataAsync(id)
select d);
Is it not possible to await something in a LINQ
query, or does it need to be structured a different way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…