Difference between next(context) vs await next.Invoke(context) in .net core middleware creation [duplicate]

As per my understanding, we need to use the next(context) to call the next request delegate/middleware. I have gone through multiple online resources, but have not found an exact difference between next(context) and next.Invoke(context).

I want to use next(context) in place of next.Invoke(context) in existing code written by another person based on my learning. If I am using next() instead of next.Invoke(context), everything is working fine. I want to know if it will impact anything or there is any difference between these two calls.



Read more here: https://stackoverflow.com/questions/68467592/difference-between-nextcontext-vs-await-next-invokecontext-in-net-core-midd

Content Attribution

This content was originally published by DSR at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: