コード例 #1
0
ファイル: Global.asax.cs プロジェクト: tahsinsevinch/zasz.me
 protected void Application_Start()
 {
     AutoFac.Setup();
     Ef4.Setup();
     Mvc.Setup();
     Solr.Setup();
 }
コード例 #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;
        }