Microsoft Unity 2.0 Released
- by shiju
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 LogRelease Notes - Unity 2 for DesktopRelease Notes - Unity 2 for SilverlightOfficial Download - Unity 2.0Official Download - Unity 2.0 for SilverlightAdditional Materials DownloadMigration GuideVideos UnityContainer Fluent InterfaceUnity 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>();