protected override void UpdateConfiguration(WebRouteConfiguration configuration) { configuration.AddControllers(typeof(PeopleController)); configuration.JsonReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; configuration.MaxTop(2).Expand().Select().OrderBy().Filter(); configuration.MapODataServiceRoute("odata", "odata", ModelGenerator.GetConventionalEdmModel()); }
protected override void UpdateConfiguration(WebRouteConfiguration configuration) { configuration.AddControllers(typeof(CustomersController), typeof(OrdersController)); configuration.JsonReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; configuration.MaxTop(2).Expand().Filter().OrderBy().SkipToken(); configuration.MapODataServiceRoute("skiptokentest", "skiptokentest", SkipTokenEdmModel.GetEdmModel(configuration)); }
protected override void UpdateConfiguration(WebRouteConfiguration configuration) { configuration.AddControllers(typeof(CustomersController), typeof(OrdersController)); configuration.JsonReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; configuration.MaxTop(2).Expand(); configuration.MapODataServiceRoute("enablequery", "enablequery", PageAttributeEdmModel.GetEdmModel(configuration)); configuration.MapODataServiceRoute("modelboundapi", "modelboundapi", PageAttributeEdmModel.GetEdmModelByModelBoundAPI(configuration)); }
protected override void UpdateConfiguration(WebRouteConfiguration configuration) { configuration.AddControllers(typeof(CustomersController), typeof(OrdersController)); configuration.JsonReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; configuration.MaxTop(10).Expand().Filter().OrderBy().SkipToken(); configuration.MapODataServiceRoute("customskiptoken", "customskiptoken", builder => builder.AddService(ServiceLifetime.Singleton, sp => EdmModel.GetEdmModel(configuration)) .AddService <IEnumerable <IODataRoutingConvention> >(ServiceLifetime.Singleton, sp => ODataRoutingConventions.CreateDefaultWithAttributeRouting("customskiptoken", configuration)) .AddService <SkipTokenHandler, SkipTopNextLinkGenerator>(ServiceLifetime.Singleton)); }