Let's Build Our Own Middleware Implementation! (And See What We Learn)

preview_player
Показать описание
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:

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

My setup:
Рекомендации по теме
Комментарии
Автор

Thank you very much, you are Excellent teacher and coder, nobody can do it better than you. You show hard topics in easy way.

bizneslupa
Автор

Awesome project! Will be replicating this tonight!🤠

DOMG
Автор

Great and amazing I enjoy it alot many thanks

abdulrahmanahmed
Автор

Like always nice explenation thank you.

eltmannkf
Автор

You are not really decorating the pipeline. Rather you loop through and execute the registered middleware before executing the requestdelegate which has been merely passed through when you loop through the middleware functions. The middleware that alters the context works since it is a reference type but the exception middleware wouldn't work as intended as I see it. Am I missing something?

DongoBongKong
Автор

Hi. Thanks for informational video as always. I want to ask can you make tutorial series/playlist from zero how to create (n-tier or clean arch) blog app? I cant find on youtube good project playlist, most of them are not finished or, its for ultra newbies

RoyZASTEROiD