ASP.NET Core Web API .NET 8 2024 - 10. Repository Pattern + DI
HTML-код
- Опубликовано: 21 окт 2024
- ASP.NET Core Web API .NET 8 2024 - 10. Repository Pattern + Dependency Injection
Github repository for the project: github.com/ted...
Twitter: / teddysmithdev
Github: github.com/ted...
Linkedin: / teddy-smith-015ba61a3
Finally, a human-readable explanation of DI. Thanks!!
Wonderful Sir
I was struggling with DI but now it's clear as crystal
thank you!
Teddy, I really loved your approach of teaching. You could have made us use Interface/repo from the start. But you incrementally teaching us How the coding approaches are evolved and make the code look better and better. Much Thanks
the concept of dependency injection didn't fully click until i heard "we need to preheat the metaphorical code oven". great video
Possibly the best quote in the history of C# development
Pure gold. Great explanation of repository usage. 😃👍🏼
thank you, Teddy, I am following you everyway
Wonderful Thank you so much 😍
I'd rather name those as SomethingService : ISomethingService. It's a small differentiator but EF already implements the repository pattern so there's no point re-implementing anything that looks like a repository or unit of work pattern and naming it away from that is at least a mental reminder it isn't a repository when it's being implemented or refactored.
amazing teacher
I laughed at the username 🤣
Why the IStockRepository and the StockRepository should be added into the Program .cs as a Service? Isn't enough accessing the "GetAllAsyc()" on the Controller just with the DI there?
Hi man. Those vids are lit 🔥🔥🔥
Nice content as always 🤩
How to implement Interface ? When I press ctrl + dot. I don't have an option to implement interface (4:35). Do you use any extension or something else to get this option?
Download VS Code extension C# dev kit by Microsoft and C# extensions by JosCreativ
@@TeddySmithDev Watching your tutorials, they are Great!!! I had these extension from previous lessons. Now everything working after restarting VS code. Many Thanks
Cool refactor.
Hi old friend, do you have any interest on doing microservices in dotnet core.
Yes, but it would be long time from now
why so ? is it not used in work env ?@@TeddySmithDev
how to get "New C#" on right click ? which extension?
8.43 Having _context parameter and injecting it in Stockcontroller constructor is unnecessary since you used it and inject it in stock repository.
🔥
can u make videos about .net maui blazor hybride
I'd do Blazor/MAUI but nobody hires in it around me so I stay out
10:14 GetAll() method: return stock, but we need to return stockDto? Or I wrong? tnx for your answer
you forgot the second code line on the GetAll() Function under the controller : var stockDto = stocks.Select(s => s.ToStockDto());
that adapt the response from database to the Dto form