DEV Community

Cover image for IServiceCollection In C# – Simplified Beginner’s Guide For Dependency Injection

IServiceCollection In C# – Simplified Beginner’s Guide For Dependency Injection

Dev Leader on February 28, 2024

The post IServiceCollection in C# – Simplified Beginner’s Guide For Dependency Injection appeared first on Dev Leader. Dependency injection is a u...
Collapse
 
arabbetts profile image
Andy Rabbetts

Good article, I wholeheartedly agree with DI and combining SOLID principles together with versioning, it just goes a long way to writing maintainable, testable code that scales better and can be concurrently worked on, it takes longer but is really worth it :-)

Collapse
 
devleader profile image
Dev Leader

Absolutely! And I think the reality is that the "takes longer" part is only initially :) It's a bit of an upfront cost, especially when learning... but once you get the hang of it more, then it's almost no extra effort up front AND you get all the goodness later!

Thanks so much for the comment!

Collapse
 
karenpayneoregon profile image
Karen Payne

Great article.
Would be nice to have a code sample available in a GitHub repository.

Collapse
 
devleader profile image
Dev Leader

Thanks @karenpayneoregon! I am overdue for pushing up my Dev Leader github repo that does have a lot of the code snippets I publish in my articles and videos.

Hard to keep up as a one-man-show though with the amount of posting going on, but I'll try to get it refreshed!