Ejemplo n.º 1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            BundleConfig.RegisterBundles(BundleTable.Bundles);
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            SecurityConfig.Register(GlobalConfiguration.Configuration);
            HubConfig.Register(RouteTable.Routes);

            //HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize();

            Database.SetInitializer(new DropCreateDatabaseIfModelChanges <TodoContext>());
            EFWarmup.Run();
        }
Ejemplo n.º 2
0
        public void Configuration(IAppBuilder builder)
        {
            var a         = Assembly.LoadFrom("Todo.Services.dll");
            var hubConfig = new HubConfiguration {
                EnableCrossDomain = true
            };

            builder.MapHubs(hubConfig);

            var webApiConfig = new HttpConfiguration();

            WebApiConfig.Register(webApiConfig);
            SecurityConfig.Register(webApiConfig);
            webApiConfig.EnableCors(new EnableCorsAttribute());
            builder.UseWebApi(webApiConfig);
        }