Esempio n. 1
0
 protected void Application_Start()
 {
     AutoFac.Setup();
     Ef4.Setup();
     Mvc.Setup();
     Solr.Setup();
 }
Esempio n. 2
0
        }                                                                  // Initiated only once in Application_Start()

        protected void Application_Start()
        {
            // Initiate NHibernate session factory, this should be done once for every application start.
            // Creating a session factory is an time-consuming operation (all mapping files are processed for example)
            SessionFactory = NHibernateHelper.SessionFactory;

            NHibernateProfiler.Initialize();

            AreaRegistration.RegisterAllAreas();

            RouteConfig.RegisterRoutes(RouteTable.Routes);

            BundleConfig.RegisterBundles(BundleTable.Bundles);

            AutoFac.Setup();

            // Avoids unexpected required attributes on value types like integer.
            DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;
        }