コード例 #1
0
        private void ConfigureDataBase()
        {
            var root = AppDomain.CurrentDomain.BaseDirectory;

            AppDomain.CurrentDomain.SetData(
                "DataDirectory", Path.Combine(root, @"SpecsForMvc.TestSite\App_Data"));

            DataConfig.Configure(new SimpleSessionStorage());
        }
コード例 #2
0
        protected void Application_Start()
        {
            InitializeConfig();

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            DataConfig.Configure();
        }
コード例 #3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            //TODO:
            //if (env.IsDevelopment())
            //    app.UseDeveloperExceptionPage();

            BackgroundServiceConfig.Configure(app, env, loggerFactory, Configuration);
            DataConfig.Configure(app, env, loggerFactory, Configuration);
            LogConfig.Configure(app, env, loggerFactory, Configuration);
            AuthConfig.Configure(app, env, loggerFactory, Configuration);
            MvcConfig.Configure(app, env, loggerFactory, Configuration);

            ReportServiceConfig.Configure(app, env, loggerFactory, Configuration);
            MessageHubConfig.Configure(app, env, loggerFactory, Configuration);
        }
コード例 #4
0
        private static void ConfigureData()
        {
            var storage = new WebSessionStorage(System.Web.HttpContext.Current.ApplicationInstance);

            DataConfig.Configure(storage);
        }
コード例 #5
0
 public static void Configure(IServiceCollection services, IConfiguration configuration)
 {
     DataConfig.Configure(services, configuration);
     services.AddScoped <IUserService, UserService>();
     services.AddScoped <IMovieService, MovieService>();
 }