🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

Unity.Mvc3

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Unity.Mvc3

Unity.Mvc3 is a library that allows simple Integration of Microsoft's Unity IoC container with ASP.NET MVC 3. This project includes a bespoke DependencyResolver that creates a child container per HTTP request and disposes of container resolved IDisposable instances at the end of the request.

1.2.0
NuGet
Version published
Maintainers
1
Created
Source

Getting started with Unity.Mvc3

To get started, just add a call to Bootstrapper.Initialise() in the Application_Start method of Global.asax.cs and the MVC framework will then use the Unity.Mvc3 DependencyResolver to resolve your components.

There is code in the bootstrapper to initialise the Unity container. Any components that you need to inject should be registered in the BuildUnityContainer method of the Bootstrapper. All components that implement IDisposable should be registered with the HierarchicalLifetimeManager to ensure that theey are properly disposed at the end of the request.

It is typically not necessary to register your controllers with Unity.

You can find out more about Unity.Mvc3 by visiting:

http://devtrends.co.uk/blog/introducing-the-unity.mvc3-nuget-package-to-reconcile-mvc3-unity-and-idisposable

Keywords

unity

FAQs

Package last updated on 16 May 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts