protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new RazorViewEngine()); var autoMapperConfig = new AutoMapperConfig(new List<Assembly> { Assembly.GetExecutingAssembly() }); autoMapperConfig.Execute(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ViewEnginesConfig.RegisterViewEngines(ViewEngines.Engines); var autoMapper = new AutoMapperConfig(new[] { Assembly.GetExecutingAssembly() }); autoMapper.Execute(); ModelBinderProviders.BinderProviders.Add(new EntityModelBinderProvider()); Database.SetInitializer(new MigrateDatabaseToLatestVersion<BookmarksDbContext, Configuration>()); }