Let's Build Our Own Middleware Implementation! (And See What We Learn)
Middleware in #aspnetcore are really great! They provide a way to configure the request pipeline with custom components. ASP.NET Core middleware actually implement the decorator design pattern. Therefore, the natural question is: how can we build our custom middleware-like implementations and use it in non-Asp.Net Core apps? Well, it’s easier than you might expect. You just need to be aware of delegates and Func in #csharp and everything will come natural. In this video, we’re building our own middleware implementation in a sorting app. Watch it and you won’t regret!
Join this channel to get source code access and other perks:
https://www.youtube.com/channel/UCyTPru-1gZ7-4qblcKM0TiQ/join
My other channel: https://www.youtube.com/@DanPatrascuTech
Content:
1. Intro: 00:00
2. Desired outcome: 01:42
3. Capturing contextual information: 03:35
4. It’s all about delegates! 04:18
5. Creating our app: 05:37
6. What about Func? 07:29
7. Building the pipeline: 08:38
8. Registering middleware: 11:05
9. Understanding pipelining: 15:55
10. How is this useful? 19:32
Comments are closed.