Fix Your Controllers By Refactoring To Minimal APIs

preview_player
Показать описание

Minimal APIs were added in .NET 6 and keep improving with each new version. Minimal APIs are easy to work with, more lightweight than controllers, and perform better. But how do you move from Controllers to Minimal APIs? That's what I will show you in today's video.

Join my weekly .NET newsletter:

Read my Blog here:

Chapters
0:00 Controllers are dinosaurs
1:31 Going from Controllers to Minimal APIs
4:27 Using static methods for endpoints
9:19 How to use Groups to manage endpoints
10:35 Exposing endpoints on the API level
12:30 Strong typing for Minimal APIs
Рекомендации по теме
Комментарии
Автор

I love your videos Milan. I eagerly wait for your videos every week. I like your content style and the depth with which you explain like a teacher I never had. I wish you all the success, health and happiness. Never stop making these videos man. 😊❤

vivekkaushik
Автор

Awesome video Milan. I do agree with not unit testing your controllers. But we should write integration/functional tests, especially on customer facing API's. Good weekend!

thomascv
Автор

Milan you are doing a great job, very very to-the-point videos and too much content are covered in a very short time. Thank you.

InshuMussu
Автор

I didn't get why should I use this instead of controllers. Doesn't make sense in my head using this if I'm making a CRUD.

gusflopes
Автор

Thank you so much for taking your time to create such a great explaination. Cheers, buddy!

AndreasFroyland
Автор

Good video but I don’t think controllers need to be “fixed”. There’s nothing wrong with using controllers, it’s just another option on how you build an API. The title seems a little misleading to me, it would more accurate to title it something like “Converting you MVC API controller to minimal APIs” imo

yunietpiloto
Автор

Thank you very much for the video, really glad that your channel is growing, you came a long way, you deserve more.

cyrildouglas
Автор

Very nice video, extremely simple explaining. I love your contents. Go on Milan! 💯

hamitkarahan
Автор

We start learning something, that time that seems shining and commonly used across the community. After some time that becomes obsolete and another thing starts shining and being talked about everywhere, we are caught in a trap of never ending process 😂

microtech
Автор

Awesome video Milan, you teaching style is great, Keep posting such content and do not stop....😍

MohammedHassan-ugcu
Автор

Thanks, Milan, This is what I'm looking for.

AndrewTateII
Автор

Thanks alot. straightforward and useful video. ✌️

mhmrezaramezani
Автор

Thanks, Milan, This is useful and it's exactly what I was looking for.

alejandroaguirre
Автор

Would love to see a minimal API example that handle login and register endpoints in DDD environment that uses an AuthorizationService.

dannym
Автор

Thank you for the great video!
The only thing, I didn't get point of using carter. First of all, anyway I have to not forget to mark my class with ICarterModule, then it's bring unclear behaviour to the class, because for me it's not obvious, that AddRoutes internally would register my endpoints class, and the last but not least, it's external dependency. Maybe I missed something?

ПодушечкаМягкая
Автор

Thanks a lot Milan, you are awesome. keep going 👍

Tamer_Ali
Автор

Very interesting video. Thank you Milan!

kodindoyannick
Автор

Awesome video, I didn't realise that using the Results<> inferface is almost like a discriminated union, very nice. What do you think about using carter to separate each endpoint into a separate class, like the handler command/handler approach used with MediatR, or is this overkill? Interested to get your opinion.

morganishere
Автор

@milanJovanovicTech . Great video
I guess its a case of different strokes for different folks....folks in this case are projects.
Minimal API is a tool in the toolbox, you might use or not.

on to the next one

ologungbaradavid
Автор

What if I use mediatr and only use mediatr as a service in my controllers, and the actual implementation is outside the presentation layer?

theprimecoder
join shbcf.ru