コード例 #1
0
        protected void Application_Start()
        {
            var config = GlobalConfiguration.Configuration;

            config.EnableQuerySupport();

            var controllerSelector = new ODataVersionControllerSelector(config);
            config.Services.Replace(typeof(IHttpControllerSelector), controllerSelector);

            V1.WebApiConfig.Register(config);
            V2.WebApiConfig.Register(config);
        }
コード例 #2
0
        protected void Application_Start()
        {
            var config = GlobalConfiguration.Configuration;

            config.AddODataQueryFilter();

            var controllerSelector = new ODataVersionControllerSelector(config);
            config.Services.Replace(typeof(IHttpControllerSelector), controllerSelector);

            V1.WebApiConfig.Register(config);
            V2.WebApiConfig.Register(config);

            config.EnsureInitialized();
        }