Exemplo n.º 1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            Bootstrapper.Initialise();
            #if DEBUG
            Database.SetInitializer(new Configuration());
            Collision.Sql.Ef.CollisionEntities db = new Collision.Sql.Ef.CollisionEntities();
            db.Database.Initialize(true);
            #endif
        }
Exemplo n.º 2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            Bootstrapper.Initialise();
            #if DEBUG
            Database.SetInitializer(new Configuration());
            Collision.Sql.Ef.CollisionEntities db = new Collision.Sql.Ef.CollisionEntities();
            db.Database.Initialize(true);
            #endif
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            #if DEBUG
            Database.SetInitializer(new Collision.Sql.Ef.Migrations.Configuration());
            Collision.Sql.Ef.CollisionEntities db = new Collision.Sql.Ef.CollisionEntities();
            db.Database.Initialize(true);
            #endif

            var container = new UnityContainer();
            container.RegisterType<IPositionRepository, PositionRepository>();
            container.RegisterType<IAircraftRepository, AircraftRepository>();
            container.RegisterType<IConflictRepository, ConflictRepository>();
            container.RegisterType<IApplication, Application>();
            var app = container.Resolve<Application>();
            app.Run();
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            #if DEBUG
            Database.SetInitializer(new Collision.Sql.Ef.Migrations.Configuration());
            Collision.Sql.Ef.CollisionEntities db = new Collision.Sql.Ef.CollisionEntities();
            db.Database.Initialize(true);
            #endif

            var container = new UnityContainer();
            container.RegisterType <IPositionRepository, PositionRepository>();
            container.RegisterType <IAircraftRepository, AircraftRepository>();
            container.RegisterType <IConflictRepository, ConflictRepository>();
            container.RegisterType <IApplication, Application>();
            var app = container.Resolve <Application>();
            app.Run();
        }