C
C#2y ago
Kosta

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

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