Osama Khodroj’s Post

View profile for Osama Khodroj, graphic

Senior Software Engineer at Datapatrol | .NET Specialist | Microsoft Technology Instructor, empowering learners for the dynamic tech landscape

𝐑𝐮𝐧, 𝐔𝐬𝐞, 𝐚𝐧𝐝 𝐌𝐚𝐩 𝐌𝐞𝐭𝐡𝐨𝐝𝐬 𝐢𝐧 .𝐍𝐄𝐓 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞 💡 In ASP.NET Core, the Run, Use, and Map extension methods are used to configure middleware in the application pipeline. Here's a breakdown of each method and its purpose: 1- 𝐑𝐮𝐧: The Run method is used to terminate the pipeline and generate a response. It should be used at the end of the middleware pipeline because it stops the pipeline from further processing. 2- 𝐔𝐬𝐞: The Use method is used to add middleware to the pipeline. It can handle requests and pass them to the next middleware in the pipeline using the next parameter. 3- 𝐌𝐚𝐩: The Map method is used to map middleware to specific request paths. It allows you to branch the middleware pipeline based on the request path.

To view or add a comment, sign in

Explore topics