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