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(); }
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); }