예제 #1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            MapperConfig.RegisterMappings();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            ViewEnginesConfig.RegisterViewEngines(ViewEngines.Engines);
        }
예제 #2
0
        protected void Application_Start()
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <SnippyDbContext, SnippyDbConfiguration>());

            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            ViewEnginesConfig.RegisterViewEngines(ViewEngines.Engines);

            var autoMapperConfig = new AutoMapperConfig(new List <Assembly> {
                Assembly.GetExecutingAssembly()
            });

            autoMapperConfig.Execute();
        }