Dependency Injection in .NET Core 2.0

Dependency Injection in .NET Core 2.0

Not easy! But it was not impossible! Yes, I am talking about my first book as co-author titled Dependency Injection in .NET Core 2.0.

The Start

The first page was not easy. I am talking about my first book’s first chapter’s first page. I was not able to find ideas on how to start writing. In fact, I cried for some time. But as usual, I motivated myself and accepted the challenge. I am not the kind of person who is scared of failure.

The Strategy

No doubt that I had experience in writing and I like that a lot, but writing articles, and blogs is different from writing a book. That is what I learned after completing the book. After a lot of confusion, I started to design a well-defined strategy to deal with the situation.

The steps were:

  1. Make a note of the outline of the first chapter.

  2. Now, forget about the book.

  3. Search for articles, blogs and videos on the topics related to the first chapter based on the outlines.

  4. Make important points and draw diagrams to understand the concepts.

  5. Now start writing on the topics with the information gathered.

Interesting, isn’t it?

I started to enjoy this process and gradually completed the first chapter. Likewise, I followed the same steps for other chapters as well.

The Outcome

Hard work always pays off. I was not the only one who was working hard. There were many techies and editors involved in the background along with my co-author.

Mr Gaurav Arora, who is my mentor and guide, challenged me with this project. My editors Mr. Lawrence Veigas and Miss. Tiksha Sarang, who is very talented and friendly, did an amazing job in rectifying the mistakes and suggested improvements from time to time.

The outcome was beautiful and the cover looked like below:

Tadit Dash Dependency Injection in .NET Core 2.0

About the Book

.NET Core provides more control than ever over web application architectures. A key point of this software architecture is that it’s based on the use of Dependency Injection as a way to properly implement the Dependency Inversion principle proposed in the SOLID principles established by Robert C. Martin.

With the advent of .NET Core, things have become much simpler with Dependency Injection built into the system. This book aims to give you a profound insight into writing loosely-coupled code using the latest features available in .NET Core. It talks about constructors, parameters, setters, and interface injection, explaining in detail, with the help of examples, which type of injection to use in which situation. It will show you how to implement a class that creates other classes with associated dependencies, also called IoC containers, and then create dependencies for each MVC component of ASP.NET Core. You’ll learn to distinguish between IoC containers, the use of Inversion of Control, and DI itself since DI is just a way of implementing IoC via these containers. You’ll also learn how to build dependencies for another front-end tool such as Angular. You will get to use the in-built services offered by .NET Core to create your custom dependencies.

Towards the end, we’ll talk about some patterns and anti-patterns for Dependency Injection along with some techniques to refactor legacy applications and inject dependencies.

What You Will Learn

  • Understand the concept of DI and its implications in modern software construction

  • Learn how DI is already implemented in today’s frameworks.

  • Analyze how DI can be used with current software to improve maintainability and scalability.

  • Learn the use of DI in .NET Core

  • Get used to the possibilities that DI offers the ASP.NET Core developer in different scenarios.

  • Learn about good practices and refactoring legacy code.

How to get the Book?

The book is available on Amazon in two formats Kindle and Paperback. Also available on Publisher’s (Packt’s) site in Ebook and Paperback formats. Links are given below.





Techies are loving the book as I am getting reviews from different sources. Moreover, I am getting reviews in the mail and on social media.

I would be grateful to you if you feed in your comments about the book on Don’t hesitate to ask me questions by adding comments below. Share with your friends and colleagues.

Thanks for reading the blog. Have a nice day ahead.


Did you find this article valuable?

Support Tadit Dash by becoming a sponsor. Any amount is appreciated!