void Application_Start(object sender, EventArgs e) { // 在应用程序启动时运行的代码 RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //初始化 product 数据库 Database.SetInitializer(new ProductDatabaseInitializer()); RoleActions roleActions = new RoleActions(); roleActions.createAdmin(); //添加Routes RoutesManage routeManage = new RoutesManage(); routeManage.RegisterCustomRoutes(RouteTable.Routes); }
void Application_Start(object sender, EventArgs e) { // Code that runs on application startup RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); // Initiate the product database. Database.SetInitializer(new ProductDatabaseInitializer()); // Create the custom role and user. RoleActions roleActions = new RoleActions(); roleActions.AddUserAndRole(); // Add Routes. RegisterCustomRoutes(RouteTable.Routes); }