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.42  ·  Rating details ·  683 ratings  ·  71 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.42  · 
Rating details
 ·  683 ratings  ·  71 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.
Mar 29, 2019 rated it it was amazing  ·  review of another edition
Excellent book! One of the best you can find regarding software design principles.
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.
Ismail Mayat
Nov 11, 2019 rated it it was amazing  ·  review of another edition
This is a must read, love how authors show how DI leads to clean code based on SOLID principles. Some real eye openers let's put it this way I won't be accidently making volatile dependencies singletons ever again!! ...more
Iman Jahandideh
I found the book too verbose and too long. It seems the book can be a lot less. Specially in the first parts where other topics like SOLID and Design Patterns are introduced. If someone already knows about these topics these section are just pure filler.

The book also failed to answer my main questions about Dependency injection, at least explicitly; Mainly how to deal with long composition chains and how to deal with dynamic creation of objects that need dependencies. I couldn't find any explic
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
Matthew Shinker
Sep 15, 2020 rated it really liked it
This book is full of design pattern goodness - not just Dependency Injection(DI). In fact, they're great information on anti-patterns covered as well. Both authors leverage their extensive experience using DI on a bunch of different projects. As design pattern purists they chose to teach DI first without fancy DI containers or frameworks. Once the reader gets a full understanding of the patterns, and anti-patterns, involved here then finally the authors tackle the most popular .NET DI frameworks ...more
Δημήτρης Κόκκινος
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)
Ivan Ivanov
Nov 08, 2020 rated it really liked it  ·  review of another edition
I liked the book. It explains DI very well. Also it shows some design patterns (Decorator, Command) and principles(SOLID, DRY, Command-Query) which can be used with DI. The result is a book about writing clean and maintainable code with the help of DI. There is a chapter for anti-patterns as well.

Even though the title is DI in .NET the book could be helpful to people using other technologies. However there are some sections specifc to .NET like DI libraries and some other sections focused on app
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.
Shyam Poovaiah
This was my first introduction to dependency injection along with SOLID principles.
Along with Mark's Pluralsight course this is everything you need.
All the popular frameworks have been presented along with a comparison to others.
The initial chapters presenting the ideas are amazing.
Mark's blog on these principles are a must read.
Jeff Patterson
Nov 04, 2021 rated it it was amazing
Excellent. Although the book is older, I couldn't tell that it was dated. Everything in it still seemed current and applicable.
If you are interested in learning how to keep your programs maintainable and the classes "single responsibility," then read this book. I promise you will learn something interesting.
Dayton Outar
Mar 02, 2022 rated it it was amazing
The first 3 chapters basically summarizes what this book is about. All the other ensuing chapters fill out the details, which is a pretty effective strategy used by the Manning publishers for years now.

Chapter 10 was an amazing chapter for me. Loved the insights. This chapter proves the importance and usefulness of Design Patterns. It is another great reference and companion text to the GoF book, "Design Patterns: Elements of Reusable Object-Oriented Software".
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
Lam Từ
Sep 09, 2020 rated it it was amazing
Indispensable for writing a maintainable and testable system.
Cezary Piątek
Sep 17, 2020 rated it it was amazing
This should be a mandatory position for every software developer.
Dimitur Nikolov
Jun 04, 2021 rated it it was amazing
This become my Bible on good programing practices in OOP.
One of the best books I have read about sofware design. Very well written, and I got more out of reading it than I expected beforehand.
Sohrab Sardari
Dec 23, 2021 rated it it was amazing  ·  review of another edition
I recommend this book to not only dotnet developers, but to all developers. good job mark!
Marrion Luaka
Jul 05, 2021 rated it it was amazing  ·  review of another edition
An excellent book about not just dependency Injection but also SOLID principles and other useful design patterns applied in real life situations. An absolute banger! 7/5 for me.
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
« previous 1 3 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • Clean Code: A Handbook of Agile Software Craftsmanship
  • Unit Testing: Principles, Practices, and Patterns
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • C# in Depth
  • Test-Driven Development: By Example
  • Clean Architecture
  • The Pragmatic Programmer: From Journeyman to Master
  • The Art of Unit Testing: With Examples in .NET
  • Domain-Driven Design: Tackling Complexity in the Heart of Software
  • Microservice Patterns
  • Working Effectively with Legacy Code
  • The Clean Coder: A Code of Conduct for Professional Programmers
  • Peopleware: Productive Projects and Teams
  • Practical Object Oriented Design in Ruby
  • Impact Mapping: Making a Big Impact with Software Products and Projects
  • The Mom Test: How to talk to customers & learn if your business is a good idea when everyone is lying to you
  • 45 Татуировок менеджера
  • Architecting for Scale: High Availability for Your Growing Applications
See similar books…

Goodreads is hiring!

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

News & Interviews

Readers with adventurous frontal lobes will be happy in July—this month’s batch of new books features some particularly bold ideas and...
8 likes · 3 comments