I would like to create a nuget package for ASP.NET MVC (and ASP.NET Core MVC) applications.
The result should be a package, that you only need to activate via middleware like:
app.UseXyz()
and that reacts to a specific route ie URL:PORT/logtrace
.
And I already created a middleware component that can return a web response to a route, but I can only work with basic httprequests inside of the middleware.
Since the logic, I want to program is more complex, I would need something like MVC controllers to utilize POST/GET requests and views.
Can I somehow use the MVC pattern inside an Owin middleware? Or is there even an easier way that I could not come up with, for creating a nuget package, that handles specific routes with controllers/views?