.NET 5 REST API Tutorial: 03 Dependency Injection, DTOs

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

This is the third part of my .NET 5 REST API Tutorial. You will learn:
• What is dependency injection?
• How to register and inject dependencies in .NET 5
• How to implement Data Transfer Objects (DTOs)
• How to implement Data Transfer Objects (DTOs)

#dotnet #restapi #tutorial
Рекомендации по теме
Комментарии
Автор

This is an impressive series. I have never come across such a clear and concise explanation of Dependency Injection. This is now my #1 link to hand to junior developers when trying to get them up to speed on the why and how of DI. Bravo!

jonhubbard
Автор

Your clear explanation of Dependency Injection is the one that made it all click for me! Thanks so much 🙏

gazells
Автор

one of the best tutorial I watch he use visual representation to make explanation better your a rockstar man thanks

zjp
Автор

I like the way you explain "this" at 17:00 -- very clear and easy to understand. Thanks!

RNN
Автор

Your lessons are worth a GOLD :) Thanks for explaining Patterns in very easy way :)

itbank
Автор

One of the best representation and explanation I have ever come across for DI. This is very lucid to understand. Thank you Julio. Keep up the good work.

dheeraj
Автор

With time and effort, your channel will definitely grow. You're very talented at this.

thesuperiorman
Автор

Julio, your videos are awesome. I loved these tutorials, precise and clear to understand. Kudos man.

mywildlifestories
Автор

Thank you so much Julio!
But can we have several static methods in our static class to convert different Entities to DTOs?

torrvic
Автор

Nice and very understandable tutorial. All the best!

brianbaldos
Автор

Awesome series and very clear to understand. Thank you so much Julio!!!

sowmyancs
Автор

thank yoo for your work man! very informative!

Pixch
Автор

thanks for your videos, , , it shows me many things i'm looking for especially your explainning for the abbreviations used in api

MrMostafam
Автор

8:34 is why u do right naming conventions on private readonly variables with _repository so you don't need to assign it to this instance of the controller..

Thepuddingmovies
Автор

Awesome Tutorials, i just found 1 thing. In the function AsDto you have to validate if the parameter is null or not, and return null if is it.
If you try to find a item that doesnt exist in the List or DB, you will get an unhandled exception.

public static ItemDto AsDto(this Item x)
{
if (x is null) return null;
return new ItemDto{
Id = x.Id,
Name = x.Name,
Price = x.Price,
CreatedDate = x.CreatedDate
};
}

sebastianreynosonunez
Автор

I love your videos. do more videos thank you

kartheeknandini
Автор

Hi, So the fact of adding services.AddSingleton<ItemsRepository, InMemItemsRepository>(); in startup, then just chnage the constructor repository), will make the controller to receive the right object, how does this work? There is nothing from startup sending this object to the controller? Can you please explain as I am new to this injection stuff Thanks

eliassal
Автор

If we have multiple microservices what would be the best way to organize the repository and other artifacts? Is it per project or a common project? Also, a video on Entity Framework Core would be very helpful too!!!

sowmyancs
Автор

Hello Hulio,

Instead of using IEnumarable<Item> if we can use Task<IActionResult> as return type we can avoid the Item schema which displaying in swagger

kartheeknandini
Автор

Tq, Julio. Learn alot from your videos.👍👍👏👏👏

doeseast
welcome to shbcf.ru