protected void Application_Start() { SwaggerConfig.Register(Server); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalConfiguration.Configuration.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); NinjectConfig.Register(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); NinjectConfig.Register(GlobalConfiguration.Configuration, kernel => { kernel.Bind <ICardService>().To <TfsCardService>(); }); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); }
public void Configuration(IAppBuilder app) { var config = new HttpConfiguration(); WebApiConfig.Register(config); var kernel = CreateKernel(); NinjectConfig.Register(kernel); app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll); ConfigureOAuth(app, kernel); app.UseNinjectMiddleware(() => kernel); app.UseNinjectWebApi(config); }
/// <summary> /// Load your modules or register your services here! /// </summary> /// <param name="kernel">The kernel.</param> private static void RegisterServices(IKernel kernel) { NinjectConfig.Register(kernel); }