Skip to content

amolaher67/AML-RESTAPIRESPONSEWRAPPER-CORE

Repository files navigation

AML-RESTAPIRESPONSEWRAPPER-CORE

Now that we already implemeted our custom middlerware, we can then create a static class to simplify adding the middleware to the application’s pipeline:

Hide Copy Code public static class ApiResponseMiddlewareExtension { public static IApplicationBuilder UseAPIResponseWrapperMiddleware(this IApplicationBuilder builder) { return builder.UseMiddleware(); } } And the final step to use our custom middleware is to call the extension method that we created above within the Configure() method of Startup class:

Hide Copy Code app.UseAPIResponseMiddleware();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages