Esempio n. 1
0
        public static void Register(HttpConfiguration config)
        {
            UnityUtilities.RegisterTypes(UnityConfig.Container);
            var builder = new ODataConventionModelBuilder();

            builder.EntitySet <Investment>("Investments");
            builder.EntitySet <InvestmentInfluenceFactor>("Factors");
            builder.EntitySet <InvestmentGroup>("Groups");
            builder.EntitySet <Region>("Regions");
            builder.EntitySet <InvestmentRisk>("Risks");
            config.Routes.MapODataServiceRoute("odata", "odata", builder.GetEdmModel());
            config.DependencyResolver = new UnityDependencyResolver(UnityConfig.Container);
            config.Filters.Add(new GlobalLoggingWebApiAttribute());
        }
Esempio n. 2
0
 public static void RegisterComponents()
 {
     UnityUtilities.RegisterTypes(Container);
     DependencyResolver.SetResolver(new UnityDependencyResolver(Container));
 }