skip to the main content area of this page
Patterns and Practices

Dependency Injection in C# 3.0 with Autofac CodeProject Article


Nick Blumhardt wrote an article on CodeProject that shows how to use Autofac for dependency injection in your applications.

You can find some getting started links here on PnPGuidance if you are interested in using Autofac in your ASP.NET Webform, MVC, or smart client applications:

The Dependency Injection Articles shows some pretty cool uses of Autofac. Here is the table of contents:

  • The Example Application
    • Checking for Overdue Memos
    • Notifying the User
    • Data Storage
  • Wiring Up Components
    • Dependency Injection by Hand
    • Dependency Injection with a Container
  • Component Registrations
    • Registering a Component Created with an Expression
    • Registering a Component Instance
    • Registering a Component with its Implementation Type
  • Completing the Example
  • Deterministic Disposal
    • Disabling Disposal
    • Fine-Grained Control of Component Lifetimes
  • Scope
    • Singleton Scope
    • Factory Scope
    • Container Scope
    • Using Scope to Control Visibility
  • Autofac in Applications
    • Expressive Registrations
    • Simplified Integration

Read the article.


Tags: Autofac, DependencyInjection, IoC


Topics



Popular Tags



Recent Links