AddSingleton(), AddScoped() & AddTransient() in a .NET 7 Web API 🚀

🚀 Join the .NET Web Academy: learn.dotnetwebacademy.com
💖 Support me on Patreon: / _patrickgod
🚀 Get the .NET 8 Web Dev Jump-Start Course for FREE: dotnet8.patrickgod.com
🐦 Let's get social on Twitter/X: / _patrickgod
🔗 Let's connect on LinkedIn: / patrickgod
💡 Udemy Online Courses:
🔥 Blazor E-Commerce Course: www.udemy.com/course/blazor-e...
🔥 Blazor Bootcamp: www.udemy.com/course/blazor-w...
🚀 .NET Jumpstart Course: www.udemy.com/course/net-core...
Table of Contents:
00:00 AddSingleton(), AddScoped() & AddTransient() in a .NET 7 Web API
00:13 The Web API Project
02:38 AddSingleton()
06:15 AddScoped()
10:19 AddTransient()
#DotNet #DependencyInjection #PatrickGod

Пікірлер: 34

  • @user-xv4vz1fg1d
    @user-xv4vz1fg1d9 ай бұрын

    Crystal clear explanation. thank you Patrick

  • @PatrickGod

    @PatrickGod

    9 ай бұрын

    Glad I could help. Thrilled to have you in the .NET Web Academy! 😁

  • @vintagewander
    @vintagewander Жыл бұрын

    wow exactly what I needed to learn, thanks Patrick

  • @Waaade1
    @Waaade15 ай бұрын

    best explanation on youtube for sure ! thanks Patrick

  • @joaogabrielv.m328
    @joaogabrielv.m328 Жыл бұрын

    Hell yeah! This video really helped, Patrick. Keep up, man

  • @PatrickGod

    @PatrickGod

    Жыл бұрын

    Glad I could help! 😁

  • @edosoghomonyan3072
    @edosoghomonyan30725 ай бұрын

    Thank you my friend, it's a great example of DI life time!

  • @embossCoder
    @embossCoder10 ай бұрын

    Really well explained. Please keep uploads this kind of videos. Really helpful. Thank you.

  • @PatrickGod

    @PatrickGod

    10 ай бұрын

    Thank you for your kind feedback!

  • @Roman-uy7qp
    @Roman-uy7qp10 ай бұрын

    You are such a legend.

  • @PatrickGod

    @PatrickGod

    10 ай бұрын

    Thank you so much! 😅

  • @shabanelmogy7912
    @shabanelmogy7912 Жыл бұрын

    thanks

  • @dasfahrer8187
    @dasfahrer8187 Жыл бұрын

    Not a fan of zombie stuff, but I really appreciate the fun example.

  • @mhsn27mhsn10
    @mhsn27mhsn1020 күн бұрын

    thank you , very simple video

  • @Kirtish19
    @Kirtish1911 ай бұрын

    Nice informative video. Series is last of us.

  • @dasfahrer8187
    @dasfahrer8187 Жыл бұрын

    Sound like these really need to be thought about in regards to the context of the API, database updates and whether or not EF tracking has been turned off (which in an API it probably should be).

  • @AmirAliZargaran82
    @AmirAliZargaran822 ай бұрын

    thanks a lot

  • @arturg6771
    @arturg6771 Жыл бұрын

    Thanks for the video. please record a video about API and cloud solutions. maybe CRUD

  • @PatrickGod

    @PatrickGod

    Жыл бұрын

    You mean deploying your Web API to Azure, for instance?

  • @arturg6771

    @arturg6771

    Жыл бұрын

    @@PatrickGod Yes Web API to Azure, it would be cool to see from you, you explain and show coolly. If you want to do with AWS it will also not be bad

  • @ruslan_yefimov

    @ruslan_yefimov

    Жыл бұрын

    @@PatrickGod That would be awesome :) Setting up different deploys, database as a separate microservice or whatever you think is more importand

  • @arturg6771

    @arturg6771

    Жыл бұрын

    @@PatrickGod It would be cool to see Azure and MongoDB or some other database

  • @raphaellukas3328
    @raphaellukas3328 Жыл бұрын

    Ich liebe The Last Of Us :-) Gestern die letzte Episode gesehen! Was halten Sie von der Spieladaption?

  • @PatrickGod

    @PatrickGod

    Жыл бұрын

    Phänomenal. Sowohl Spiel als auch Serie, wunderbar umgesetzt. 😁

  • @idkanymoreman
    @idkanymoreman Жыл бұрын

    hi patrick, awesome stuff as usual. if i have a row of 200,000 in a table, is using Ef Core a good idea? if so, how can i make the fetching process faster.. it takes way too long to fetch. thanks

  • @basszoneproduction

    @basszoneproduction

    Жыл бұрын

    I hope your found your answer already, if not. What is the purpose of fetching 200,000 in one go?

  • @idkanymoreman

    @idkanymoreman

    Жыл бұрын

    @@basszoneproduction yes, it was out of curiosity.. and I didn't learn about offset and pagination. Im using that now to fetch data. But In most of my use cases, I found dapper to be faster for fetching data than ef core.

  • @basszoneproduction

    @basszoneproduction

    Жыл бұрын

    Cool!

  • @ameetjayawant4114
    @ameetjayawant4114 Жыл бұрын

    The Last of Us!!

  • @PatrickGod

    @PatrickGod

    Жыл бұрын

    😁

  • @CFox.7
    @CFox.7 Жыл бұрын

    No idea what this is and why it popped up in my recommended but got a feeling Chat GPT will be doing this very soon

  • @Roman-uy7qp

    @Roman-uy7qp

    10 ай бұрын

    ChatGBT sucks. If it can do something in a more skilled manner than you can it means you weren't very skilled anyway.

  • @thebeeamberheardsdogsteppe6368
    @thebeeamberheardsdogsteppe6368 Жыл бұрын

    THE LAST OF US

  • @N8Eule1
    @N8Eule19 ай бұрын

    Thank you, again a very good tutorial. For the donation, can you please post a PayPal address for this, I don't want to give out my credit card details just like that.

Келесі