예제 #1
0
        public void Setup()
        {
            IocConfig.PreStart();

            DbConfig.Setup();

            var db = ObjectFactory.GetInstance <IDbConnection>();

            new SchemaBuilder(db).GenerateSchema(true);

            AutomapperConfig.CreateMappings();

            // Map routes... This is an annoying hack because the MVC team figured people don't care about testing attribute routes!
            MvcAttributeRoutesHack.MapAttributeRoutes();
        }
예제 #2
0
        public void Setup()
        {
            if (RouteTable.Routes == null || RouteTable.Routes.Count == 0)
            {
                RouteConfig.RegisterRoutes(RouteTable.Routes);
            }

            ObjectFactory.Initialize(x => x.AddRegistry(new IocRegistry()));

            DbConfig.Setup();

            var db = ObjectFactory.GetInstance <IDbConnection>();

            new SchemaBuilder(db).GenerateSchema(true);

            AutomapperConfig.CreateMappings();
        }
예제 #3
0
 public void Configuration(IAppBuilder app)
 {
     ConfigureAuth(app);
     AutomapperConfig.CreateMappings();
 }