コード例 #1
0
        /// <summary>
        /// Set app configuration
        /// </summary>
        /// <param name="app"></param>
        public void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            WebApiConfig.Register(config);
            AutofacWebapiConfig.SetDependencyResolver(config);
            app.UseWebApi(config);
        }
コード例 #2
0
 /// <summary>
 /// Application start
 /// </summary>
 protected void Application_Start()
 {
     GlobalConfiguration.Configure(config =>
     {
         WebApiConfig.Register(config);
         AutofacWebapiConfig.SetDependencyResolver(config);
     });
 }