C
C#3y ago
Kosta

Why cant i go into the methode? Seems to skip it entirely

Added a git, anybody got and idea?
12 Replies
ero
ero3y ago
because it's async and you're not awaiting it i guess
Kosta
KostaOP3y ago
app.MapGet("/test", async () =>
{
await MakeHttpCall();
});
app.MapGet("/test", async () =>
{
await MakeHttpCall();
});
this code results in an error build
Wz
Wz3y ago
It’s an enumerable, it does nothing until something enumerates it
Kosta
KostaOP3y ago
@Wz can u elaborate?
Wz
Wz3y ago
You need to await foreach to iterate the enumerable Or return it to something that will do so
Kosta
KostaOP3y ago
hm i dont quite get you i got no foreachloop
Servator
Servator3y ago
Instead of returning get values when it can It calculates all values then returns it
Kosta
KostaOP3y ago
So How would u write it?
Servator
Servator3y ago
Also it shouldn't take that time You are doing something wrong i guess How many lines has that .csv file ?
Kosta
KostaOP3y ago
lol i did return MakeHttpCall and it works now XD 5 million
Servator
Servator3y ago
oh
Kosta
KostaOP3y ago
guess you gotta return that

Did you find this page helpful?