Microsoft Unity 2.0 Released
Microsoft's dependency injection framework Unity Application Block (Unity) has reached version 2.0. The release available on Codeplex at http://unity.codeplex.com/
Unity 2.0
- Change Log
- Release Notes - Unity 2 for Desktop
- Release Notes - Unity 2 for Silverlight
- Official Download - Unity 2.0
- Official Download - Unity 2.0 for Silverlight
- Additional Materials Download
- Migration Guide
- Videos
UnityContainer Fluent Interface
Unity 2.0 provides a fluent interface for type configuration. Now you can call all the methods in a single statement, as shown in the following code.
IUnityContainer container = new UnityContainer()
.RegisterType<IFormsAuthentication, FormsAuthenticationService>()
.RegisterType<IMembershipService, AccountMembershipService>()
.RegisterInstance<MembershipProvider>(Membership.Provider)
.RegisterType<IDinnerRepository, DinnerRepository>();