private void initTenancy() { ITenantResolver tenantResolver = IoCFactory.Container.Resolve <ITenantResolver>(); ITenantPathProvider pathProvider = new BExISTenantPathProvider(); // should be instantiated by the IoC. client app should provide the Path Ptovider based on its file and tenant structure tenantResolver.Load(pathProvider); }
protected void Application_Start() { IoCFactory.StartContainer(Path.Combine(AppConfiguration.AppRoot, "IoC.config"), "DefaultContainer", HttpContext.Current); // use AppConfig to access the app root folder //loadModules(); IPersistenceManager pManager = PersistenceFactory.GetPersistenceManager(); // just to prepare data access environment pManager.Configure(AppConfiguration.DefaultApplicationConnection.ConnectionString, AppConfiguration.DatabaseDialect); //, AppConfiguration.DefaultApplicationConnection.ConnectionString); if (AppConfiguration.CreateDatabase) { pManager.ExportSchema(); } pManager.Start(); AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); ITenantResolver tenantResolver = IoCFactory.Container.Resolve <ITenantResolver>(); ITenantPathProvider pathProvider = new DefaultTenantPathProvider(); // should be instantiated by the IoC. client app should provide the Path Ptovider based on its file and tenant structure tenantResolver.Load(pathProvider); var x = tenantResolver.Manifest; }