❔ CallWebApiForUserAsync
I'm doing
but for some reason it isn't calling the api not even once. How do you go about calling the api with a list?
11 Replies
On that matter, what does this function do when using <TInput, TOutput> ?
https://learn.microsoft.com/en-us/dotnet/api/microsoft.identity.web.idownstreamwebapi.callwebapiforuserasync?view=azure-dotnet
You're not awaiting your async calls
I'd just use a normal
foreach
loop instead of trying to Javascript it with .ForEach()
the way I'm dumping the results into a string, then to the view model is ok?
You don't seem to have a viewmodel
it worked with the normal foreach!
jesus christ I spent 26 hours (literally) on this problem
this is the viewmodel, it's razor pages
why was it not working with .foreach?
Ah, I saw
ViewData
and thought you're using that as some demented replacement for a viewmodel
¯\_(ツ)_/¯
Dunno, I never really use it, so don't know its quirks
Probably because there's async code in the lambda you pass, but .ForEach()
itself is a void
methodI see, so the compiler just moves on because it knows it won't be returning anything anyways
yep
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.