private void Init() { _dbContext = new TrackytDataContext(ConfigurationManager.ConnectionStrings["testdb"].ConnectionString); RepositoriesInitializer.InitDB(_dbContext); _dbContext.Database.Connection.Open(); _transaction = new TransactionScope(); AddTestUser(); AddTestProject(); }
protected void Application_Start() { RepositoriesInitializer.InitDB(new TrackytDataContext()); // Routing AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); // Dependency injection ControllerBuilder.Current.SetControllerFactory(new TrackyControllerFactory()); // Auto-mapper TrackyMapping.SetupMapping(); // RouteDebugger //RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes); }