Skip to content

Commit 157a10a

Browse files
Chris Martinezcommonsensesoftware
authored andcommitted
Fix attribute route info generation
1 parent 01a214e commit 157a10a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Microsoft.AspNetCore.OData.Versioning/AspNet.OData/Routing/ODataRouteBindingInfoConvention.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.Linq;
1313
using static Microsoft.AspNet.OData.Routing.ODataRouteActionType;
1414
using static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource;
15+
using static Microsoft.AspNetCore.Mvc.Versioning.ApiVersionMapping;
1516
using static System.Linq.Enumerable;
1617
using static System.StringComparison;
1718

@@ -37,7 +38,7 @@ public void Apply( ActionDescriptorProviderContext context, ControllerActionDesc
3738
Contract.Requires( context != null );
3839
Contract.Requires( action != null );
3940

40-
var model = action.GetApiVersionModel();
41+
var model = action.GetApiVersionModel( Explicit | Implicit );
4142
var mappings = RouteCollectionProvider.Items;
4243
var routeInfos = new HashSet<ODataAttributeRouteInfo>( new ODataAttributeRouteInfoComparer() );
4344

0 commit comments

Comments
 (0)