Open VanCoding opened 8 years ago
hi @VanCoding, now I don't have any interest to extend this package with any functionality since ASP.NET Core embeds Owin and such package is not needed anymore. Please feel free to send PR with this feature.
@sergeyt interesting. Does ASP.NET Core also include a router like this, or why is this package obsolete? Isn't the whole idea behind OWIN the ability to compose the application from different middlewares, like this router?
I've first looked at WebAPI 2, but when I've found out MS also introduced OWIN, I've considered it the much better alternative, as it seems much more flexible.
But I'm pretty new on this topic, as I'm currently forced to use C# for an application instead of Node.js . Did I maybe miss something important? I of course don't want to ride a dead horse :P
Does ASP.NET Core also include a router like this?
yes, but only declarative part with attributes, functional api could be easily ported too since there is similar IAppBuilder interface as in owin
In express, it's possible to pass multiple middleware functions to the get/post/etc functions, which then get called one after another. It works like this:
if you pass one function, it gets called with the next function of the parent middleware (as it works now). If you pass two functions, the first function gets called with the second function as next, and the second function gets called with the next function of the parent middleware.
So, every function gets called with the next function as "next" (obviously) and the last function gets called with the next function of the parent.
What do you think about adding this functionality to Owin.Routing aswell?