Adnan Maqbool Khan’s Post

View profile for Adnan Maqbool Khan, graphic

Team Leader | .NET | Microservices | Azure | Vue | React | Angular | Typescript | RabbitMQ | SQL | MSTest | Cypress

𝐑𝐮𝐧, 𝐔𝐬𝐞, 𝐚𝐧𝐝 𝐌𝐚𝐩 𝐌𝐞𝐭𝐡𝐨𝐝𝐬 𝐢𝐧 .𝐍𝐄𝐓 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞 💡 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. 𝐈𝐟 𝐲𝐨𝐮 𝐟𝐢𝐧𝐝 𝐭𝐡𝐢𝐬 𝐮𝐬𝐞𝐟𝐮𝐥, 𝐫𝐞𝐩𝐨𝐬𝐭 ♻️ 𝐚𝐧𝐝 𝐬𝐩𝐫𝐞𝐚𝐝 𝐭𝐡𝐞 𝐤𝐧𝐨𝐰𝐥𝐞𝐝𝐠𝐞. 𝐅𝐨𝐥𝐥𝐨𝐰 🔔 Adnan Maqbool Khan 𝐟𝐨𝐫 𝐦𝐨𝐫𝐞 𝐬𝐮𝐜𝐡 𝐜𝐨𝐧𝐭𝐞𝐧𝐭.

  • No alternative text description for this image
Aram Tchekrekjian

Daily tips to get better in .NET and C# | Microsoft MVP | codingsonata.com | Sr. Engineering Manager at Aramex

5mo

Great explanation of the differences, very useful to know, thanks Adnan.

Ghulam Murtaza

Full Stack Engineer at e-strats || .Net Core || Asp.Net MVC || Angular || JavaScript || SQL Server

5mo

thank you for sharing

Elliot One

Entrepreneur | Founder at XANT | AI/ML Engineer | Full Stack Engineer at AITIS

5mo

Great tip. Does the app.Run() have any real-world use case?

Nikola Knežević

Daily Insights, Features, and fresh knowledge about .NET, Software Engineering, and Software Architectures

6mo

Well explained, thanks for sharing.

Poorna Soysa

Tech Enthusiast | .NET | C# | Azure | AWS | SAP

5mo

Thanks for sharing Adnan Maqbool Khan

Wellington Amorim

Programmer Specialist | React | Angular | .net | C# | Node JS |ADVPL |TL++ github.com/welllrafael

5mo

Good to know. Thanks Adnan

SERKUT YILDIRIM

Microsoft MVP | Helpful Posts About .NET, C# and Visual Studio

5mo

Nice explanation, thanks Adnan

Philip Kayode, PHILSKAY

Self-Taught .NET Engineer | Simplifying Complex .NET Applications with Real-Life Analogies | .NET Core | C# | Blazor Enthusiast

5mo

Nice share Adnan Maqbool Khan

Sina Riyahi

Software Developer | Software Architect | SQL Server Developer | .Net Developer | .Net MAUI | Angular Developer | React Developer

5mo

Very informative Adnan Maqbool Khan 👍

See more comments

To view or add a comment, sign in

Explore topics