private void ConfigureDataBase() { var root = AppDomain.CurrentDomain.BaseDirectory; AppDomain.CurrentDomain.SetData( "DataDirectory", Path.Combine(root, @"SpecsForMvc.TestSite\App_Data")); DataConfig.Configure(new SimpleSessionStorage()); }
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(); }
// 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); }
private static void ConfigureData() { var storage = new WebSessionStorage(System.Web.HttpContext.Current.ApplicationInstance); DataConfig.Configure(storage); }
public static void Configure(IServiceCollection services, IConfiguration configuration) { DataConfig.Configure(services, configuration); services.AddScoped <IUserService, UserService>(); services.AddScoped <IMovieService, MovieService>(); }