protected void Application_Start() { AreaRegistration.RegisterAllAreas(); MapperConfig.RegisterMappings(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ViewEnginesConfig.RegisterViewEngines(ViewEngines.Engines); }
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(); }