From 6f6c957f5948d8c290f350fa4cd5f5bef0d463d0 Mon Sep 17 00:00:00 2001 From: Simo Paasisalo Date: Mon, 28 Oct 2019 08:11:34 +0200 Subject: [PATCH] fix: #542 in SwaggerODataSample Count was not enabled globally, so using it in queries caused a 400 error --- samples/aspnetcore/SwaggerODataSample/Startup.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/aspnetcore/SwaggerODataSample/Startup.cs b/samples/aspnetcore/SwaggerODataSample/Startup.cs index ad121fc7..2d0b3b37 100644 --- a/samples/aspnetcore/SwaggerODataSample/Startup.cs +++ b/samples/aspnetcore/SwaggerODataSample/Startup.cs @@ -85,6 +85,7 @@ public void Configure( IApplicationBuilder app, IHostingEnvironment env, Version // routeBuilder.SetDefaultODataOptions( new ODataOptions() { UrlKeyDelimiter = Parentheses } ); routeBuilder.ServiceProvider.GetRequiredService().UrlKeyDelimiter = Parentheses; routeBuilder.MapVersionedODataRoutes( "odata", "api", modelBuilder.GetEdmModels() ); + routeBuilder.Count(); } ); app.UseSwagger(); app.UseSwaggerUI( @@ -108,4 +109,4 @@ static string XmlCommentsFilePath } } } -} \ No newline at end of file +}