protected override void UpdateConfiguration(WebRouteConfiguration configuration) { var controllers = new[] { typeof(WeatherForecastController), typeof(MetadataController) }; configuration.AddControllers(controllers); configuration.Routes.Clear(); configuration.Count().Filter().OrderBy().Expand().MaxTop(null).Select(); configuration.MapODataServiceRoute("odata", "odata", EnumsEdmModel.GetEnumAliasModel(configuration)); configuration.EnsureInitialized(); }
protected override void UpdateConfiguration(WebRouteConfiguration configuration) { var controllers = new[] { typeof(EmployeesController), typeof(MetadataController) }; configuration.AddControllers(controllers); configuration.Routes.Clear(); configuration.Count().Filter().OrderBy().Expand().MaxTop(null).Select(); configuration.MapODataServiceRoute("convention", "convention", EnumsEdmModel.GetConventionModel(configuration)); configuration.MapODataServiceRoute("explicit", "explicit", EnumsEdmModel.GetExplicitModel(configuration), new DefaultODataPathHandler(), ODataRoutingConventions.CreateDefault()); configuration.EnsureInitialized(); }