Esempio n. 1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);


            //MongoDBRepository.RegisterMongoDBContext(new PassportDBContext());
            MongoRepositoryManager.Instance.RegisterMongoDBContext();

            Initialize();

            DLogger.SetLocalPath(@"c:\log\itrip\passport");
        }
Esempio n. 2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);


            //MongoDBRepository.RegisterMongoDBContext(new iTripModelContext());
            //MongoDBRepository.RegisterMongoIndex();

            //MongoEntity.RemoveAll<Nationality>();
            //MongoEntity.RemoveAll<NativePlace>();

            //var initializer = new Initializer();
            //var nations = initializer.InitializeNationality();
            //MongoEntity.InsertBatch<NativePlace>(initializer.InitializeNativePlace(nations[0]));
            //MongoEntity.InsertBatch<Nationality>(nations);

            Initialize();
            DLogger.SetLocalPath(@"c:\log\itrip\web");
        }