Microsoft Unity 2.0 Released

Posted by shiju on ASP.net Weblogs See other posts from ASP.net Weblogs or by shiju
Published on Thu, 06 May 2010 03:43:00 GMT Indexed on 2010/05/06 9:38 UTC
Read the original article Hit count: 457

Filed under:
|


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 

 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>();  

 

© ASP.net Weblogs or respective owner

Related posts about ioc

Related posts about .NET