WorkOrderStatus/App_Start/UnityActivator.cs
/// <summary>
/// Integrates Unity when the application starts.
/// </summary>
Integrates Unity when the application starts.
Integrates Unity when the application starts .
public static void Start()
		{
			var container = WorkOrderStatusUnityContainer.GetConfiguredContainer();
			FilterProviders.Providers.Remove(FilterProviders.Providers.OfType<FilterAttributeFilterProvider>().First());
			FilterProviders.Providers.Add(new UnityFilterAttributeFilterProvider(container));
			DependencyResolver.SetResolver(new UnityDependencyResolver(container));
			Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(typeof(UnityPerRequestHttpModule));
			GlobalConfiguration.Configuration.DependencyResolver = new Unity.AspNet.WebApi.UnityDependencyResolver(container);
		}
public static void Start ( ) { var container = WorkOrderStatusUnityContainer . GetConfiguredContainer ( ) ; FilterProviders . Providers . Remove ( FilterProviders . Providers . OfType < FilterAttributeFilterProvider > ( ) . First ( ) ) ; FilterProviders . Providers . Add ( new UnityFilterAttributeFilterProvider ( container ) ) ; DependencyResolver . SetResolver ( new UnityDependencyResolver ( container ) ) ; Microsoft . Web . Infrastructure . DynamicModuleHelper . DynamicModuleUtility . RegisterModule ( typeof ( UnityPerRequestHttpModule ) ) ; GlobalConfiguration . Configuration . DependencyResolver = new Unity . AspNet . WebApi . UnityDependencyResolver ( container ) ; }
Integrates Unity when the application starts.
Integrates Unity when the application starts .
// web API