JavaScript C# PowerShell Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Demo code for "Code to DI for" -


  • common dependency injection patterns
    • Constructor Injection
    • Property / Method Injection
    • LifeCycles (Singleton/Transient/Per Request)
  • various IoC/DI frameworks
  • practical steps and guidance
    • Using Conventions / Autoregistration
    • Avoiding "Common Service Locator" Pattern
    • Compositional Root
  • real world scenarios
    • DI with Static Singletons
    • DI with Existing Types
    • DI with Collections (IList)
    • Specifying Injected Dependencies
    • Forwarder pattern (for caching/retry logic on edges)
  • impact to Unit Testing
    • DI with Mocks / Fakes
  • application architecture
    • Compositional Root (Favor composition over inheritance)
    • Essentailly: realized SOLID