I created a screencast on doing dependency injection and IoC using Unity from the Microsoft patterns & practices Team. This is an introductory screencast and shows how to use Unity with the ASP.NET MVC Framework and with ASP.NET Webforms using Model-View-Presenter. I show how to add services to the UnityContainer both programmatically and via configuration as well as one possible way to inject dependencies into both your controllers and presenter classes in your web applications.
You can view the screencast here:
The screencast is based on some blog posts with sample code that show how to do this:
If you haven’t played with Unity yet, you can visit the CodePlex website and download it. Right now is a good time to “inject” your opinions on how it should work, etc.