More Information
  • 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.

.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, parameter, 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 other frontend tool such as Angular. You will get to use the in-built services offered by .NET Core to create your own 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.

  • Identify when to use the constructors, parameters, setters, or Interface Injection, for best results
  • Build dependencies not only for MVC within .NET but also for other frontend tools such as Angular
  • Create specific components or services to cover discrete and separate pieces of functionality and call them when needed.
Page Count 436
Course Length 13 hours 4 minutes
ISBN 9781787121300
Date Of Publication 13 Nov 2017


Marino Posadas

Marino Posadas is an independent senior trainer, writer, and consultant in Microsoft Technologies. He is a Microsof MVP in C#, Visual Studio, and Development Technologies; an MCT, MCPD, MCTS, MCAD, and MCSD; and was the former Director for Development in Spain and Portugal for Solid Quality Mentors.

Marino has published 15 books and more than 500 articles on development technologies in several magazines and online publications. Topics covered in his books range from Clipper and Visual Basic 5.0/ 6.0 to C # and .NET- safe programming, to programming with Silverlight 2.0 and 4.0 and Web Standards. His latest books are Mastering C# and .NET Framework, Packt Publishing and The Guide to Programming in HTML5, CSS3, and JavaScript with Visual Studio. He is also a speaker at Microsof events, having lectured in Spain, Portugal, England, the USA, Costa Rica, and Mexico.

You can follow him on Twitter as @MarinoPosadas (

Tadit Dash

Tadit Dash is a senior software engineer and a hardcore tech community contributor. Due to his exceptional contribution to the technical community, Microsoft has awarded him with the Microsoft Most Valuable Professional accolade since 2014. CodeProject has awarded him the CodeProject MVP accolade (the first from Odisha). For his constant mentorship, IndiaMentor featured him as a young mentor on their site. He was a featured speaker at DevTechDay Nepal and C# Corner Annual Conference, India. You can follow him on Twitter: @taditdash.