Goodreads helps you keep track of books you want to read.
Start by marking “Dependency Injection in .NET” as Want to Read:
Dependency Injection in .NET
Enlarge cover
Rate this book
Clear rating
Open Preview

Dependency Injection in .NET

4.37  ·  Rating details ·  550 ratings  ·  49 reviews

Dependency Injection in .NET, winner of the 2013 Jolt Awards for Productivity, presents core DI patterns in plain C#, so you'll fully understand how DI works, covers integration with standard Microsoft technologies like ASP.NET MVC, and teaches you to use DI frameworks like Structure Map, Castle Windsor, and Unity.
About the Technology
Dependency Injection is a great
Paperback, 1 edition, 584 pages
Published September 28th 2011 by Manning Publications
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Community Reviews

Showing 1-30
Average rating 4.37  · 
Rating details
 ·  550 ratings  ·  49 reviews

More filters
Sort order
Start your review of Dependency Injection in .NET
Christian Dalager
Oct 04, 2011 rated it it was amazing
Not just a good DI Container book, but a great OO software design book, building on top of other great classics.

Even in the last chapters going through the different containers, Seemann continues to provide examples that makes you smarter.

And never have I built up an appetite like that for Sauce Bearnaise in a book about programming.

I'll keep this close to my desk.
May 17, 2013 rated it it was amazing
Shelves: programming
Seemann did a fantastic job presenting Dependency Injection in concept and practice with several different .NET frameworks. Perfect length and structure for a quick read, but also deep enough for my long-term reference on the subject.

Wish all my technical literature was produced like this.
Sep 10, 2017 rated it really liked it
I like to read books cover to cover, and as an experienced developer I found this one extremely verbose. It could have cut down the same info to half the size. If you use it more as a reference, the redudancy might be helpful.

The book did open my eyes to the concept of Composition Root, and the role of Abstract Factories that basically bridge the gap between your static object graph created at application start (the objects that would typically be Singletons in less enlightened architectures) an
Δημήτρης Κόκκινος
A very well structured book. Despite the fact that it addresses a specific subject (dependency injection), it provides a much wider and deeper insight to the structuring of certain parts of an OO project.
It paints the whole picture of dependency injection (composition, lifetime management, interception) with a lot of examples and many principles to support them.
Additionally, it pays off to have this book as a reference, because it provides a lot of material for many well known DI containers.
May 14, 2018 rated it it was amazing
Shelves: computer-science
This book is a rare gem, a must must read for OOP developers. Every line you read will make you smarter developer.
It will not only help you understanding Dependency Injection to the deepest, but also help you making better architecture your applications which would adhere to the principles and best practices.

I would recommend few prerequisites for beginners to make most of this book.
1. Understanding of C#
2. Basic understanding of Design Patterns.(Decorator, AbstractFactory, Facade, Singleton)
Jan 07, 2019 rated it really liked it
Shelves: computers
I worked for a while this fall changing our C# web projects (ASP.NET Web API v2) to use dependency injection. I'd flipped through this book before, but it was much more relevant now.

This is a well written book that drives home the concepts at play for DI, and traps to avoid. I found the material helpful. It helped frame how I think about the structure of the code, and the DI work itself (apart from this book) has been paying dividends.
Jul 19, 2018 rated it it was amazing  ·  review of another edition
Recommends it for: programmers, object-oriented designers
Shelves: programming
Despite the second edition not being completed yet, this is an absolutely invaluable resource to any programmer interested in Object Oriented Design. The concepts are clearly communicated with focused examples that are general enough to be actually practically useful.

This book is a must-read.
Mateusz Stępniak
Sep 30, 2017 rated it it was amazing
The amazing AutoFixture library creator shares some of his deep knowledge. I enjoyed culinary metaphors.
Tuan Truong
Nov 21, 2018 rated it it was amazing
My programming bible.
Yeah really worth a read.
Anton Yakovenko
Mar 02, 2020 rated it it was amazing
Shelves: programming
One of the most mind-changing books in my career. Definitely recommend if for all architects that want to create a beautiful product and not just code.
Apr 27, 2020 rated it it was amazing
Great book
Petru Cervac
Jun 22, 2020 rated it it was amazing
A must-read for everyone. It served for me as an introduction to the dependency injection principles
Ireney Berezniak
Dependency Injection in .NET is a fine book on the exact same subject of its title. It seems Mark Seemann and I have become practitioners of DI techniques in a similar manner: at first, as away of improving testability. Through exploration, this has led to a more pure DI practice, where dependency injection has become the prime focus, and not testability, though testability certainly gains in a major way from adoption of DI, of course.

As such, this title does not concern itself with unit testin
Sep 30, 2013 rated it really liked it
Shelves: technical
We use dependency injection at work, and while it's easy enough to follow the predefined patterns, and accepting that it was so we could unit test the code we were writing, I really had little idea as to what it meant beyond injecting dependencies into constructors of classes implemented on abstract interfaces. This book opened my eyes to what it is; an entire code lifestyle that goes beyond unit tests.

Seeman takes the reader through many well defined examples to hammer home the value of inversi
Marcin Golenia
Mar 27, 2020 rated it it was amazing
This book is not about dependency injection only. It's about SOLID, good programming practices, cross-cutting concerns, and of course DI. It puts to questions some valid points that some of us miss - for example what's the difference between DI and IoC?
The title says .Net but the rules and techniques described in the book can be used in most OO languages. My expectations were high (because its Mark right?) and these were 100% met.
Oleksandr Bilyk
Oct 10, 2016 rated it it was amazing
We have situation when in .NET software companies as I currently inquired (asked colleagues and read different blogs):
- 50% of people don't care about Dependency Injection
- 70% of people don't know the difference between Dependency Injection and Dependency Injection Container, Inversion of Control, Dependency Inversion. People just don't see the difference :)
- 80% of people don't understand what dependency injection is but strongly think that they using it.
- 90% of people don't understand that M
Amy Gilchrist Thorne
Mar 05, 2011 rated it really liked it
Shelves: tech, nonfiction
This book was pretty helpful in clearing up some of my confusions about dependency injection frameworks.

I already was aware of the basics of constructor injection, but was experiencing some pain around problems like constructor over-injection and lots of 1-1 mapping between interfaces and implementations. This book explores ways to fix these issues and many others.

Here are some topics the book covered that I really appreciated:

* DI patterns, including the different types of injection, and Ambien
Nikita Skurat
Mar 11, 2012 rated it really liked it
Shelves: english
This book will be very helpful for any .NET developer (and not only .NET), even for those, who've been facing DI challenges in many projects from their experience.
It contains a very detailed overview of DI, its parts, how it can be implemented, what questions developers usually face when applying these technics. And it also contains a description of several most used containers available for free.
I found reading this book really useful for me, I could see what mistakes i did in the past and whi
Feb 11, 2015 rated it really liked it
If you are interested in the concept of dependency injection and inversion of control you definitely should read this book by Mark Seemann. He explains the architectural concepts and ideas behind in the same easy to understand way as he explains the different DI containers and how to structure your code in a better way.

The theoretical parts are still up-to-date and help you to solve your problems. The specific containers however didn't stay frozen in time and evolved. Before selecting one over
Jul 01, 2013 rated it really liked it
I think this book manages to reach its purpose with every reader. While reading it I was actually thinking how much "poor man DI" was in the code I have written or how I could integrate one of the frameworks discussed in the book in the applications I was working on at that moment.
It's not an easy read((view spoiler)), but a very helpful one. My favourite chapter was the one about DI anti-patterns.
Nov 13, 2011 rated it really liked it
Shelves: non-fiction, geek, work
Great review for me about design patterns and it appears I had definitely been doing some poor man's DI (constructor injection which apparently is one of the "better" options)... Makes me want to go back and read back some of my older design patterns too. didn't finish it, but stopped about half-way since it was a weekend borrow...
Sep 23, 2012 rated it it was amazing
Shelves: computer
So glad a book finally appeared in this space. DI is not a new concept to non-MS languages, but it seems to have been utterly overlooked in the .NET stack; this book discusses DI with several big MS technologies (e.g. ASP.NET MVC) and looks at how most of the big DI containers are used in the .NET stack.

Definitely a must-read for any .NET developer.
Feb 11, 2013 rated it really liked it
This is a very well written book that clearly defines and explains Dependency Injection. Before I read this book, I had an idea of what dependency injection was, but some pieces of the picture were missing. This book clarified everything and I find myself following the patterns described in this book in my day-to-day development.
May 23, 2013 rated it it was amazing
Very well written book on general and detailed subjects related to DI. I particularly liked the recipe analogies to explain concepts. It wasn't a quick read for me and I did find myself revisiting chapters. I recommend working through code examples when possible. There are in depth chapters on most of the common DI frameworks, but if yours is not there, it is still good foundation book.
Oct 07, 2013 rated it really liked it
Free at last! This book was an educational doozy. The last chapter on MEF was a it of a letdown, but I think after 5 other DI chapters that were all largely similar, my interest might have been flagging. Enjoyed the code samples despite accent marks and other annoyances, and am glad to have read it. Will probably live on my shelf for a while, but may pull it down from time to time!
Randall Woodman
Jul 29, 2015 rated it really liked it
I didn't really "finish" it so much as I got all I wanted out of it. The first few chapters are really good at explaining the DI concept and showing examples in C#. DI is not easy to do and takes a disciplined developer to get it right. This book will help you "think" in terms of dependency injection and help make your code better. Just read it.
Hovhannes Gulyan
Jan 03, 2016 rated it really liked it
Shelves: programming
Interesting reading about DI in .NET with patterns, anti-patterns, multiple containers and much more.
That could be advanced topics for beginner developers, but also one of the most important topics of software development.
I would recommend it to .NET developers as a must-read together with C# in Depth and CLR via C#.
Jan 12, 2017 rated it it was amazing
This is by no means a walk in the park to read but it is invaluable. At the very least, you'll know the standard names for common ways of injecting dependencies. Hopefully you'll learn the advantages and pitfalls of many different ways as well. I agreed with the author in most cases and I am able to tell he is very experienced. Heed his advice.
Artur A
Jul 12, 2012 rated it liked it
Shelves: it
It is not DI Container book, but mostly book with advice to software design. The key information is very small and the rest is water. Many valued topics are not not covered or left cut (for example, unit testing and hole program composition).
« previous 1 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • The Art of Unit Testing: With Examples in .NET
  • Clean Code: A Handbook of Agile Software Craftsmanship
  • C# in Depth
  • Clean Architecture
  • The Pragmatic Programmer: From Journeyman to Master
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • Refactoring: Improving the Design of Existing Code
  • Domain-Driven Design: Tackling Complexity in the Heart of Software
  • The Clean Coder: A Code of Conduct for Professional Programmers
  • The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win
  • CLR via C# (Pro-Developer)
  • Patterns of Enterprise Application Architecture
  • Soft Skills: The Software Developer's Life Manual
  • Agile Principles, Patterns, and Practices in C#
  • Adaptive Code Via C#: Agile Coding with Design Patterns and Solid Principles
  • Test Driven Development: By Example
  • The Unicorn Project
  • Secrets of the JavaScript Ninja
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »

Related Articles

In these strange days of quarantine and isolation, books can be a mode of transport. We may have to stay home and stay still, but through t...
57 likes · 39 comments