File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/AspNetCore/OData/src/Asp.Versioning.OData/OData Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -116,15 +116,12 @@ static void NoConfig( IServiceCollection sc )
116116 // 2. OData adds a SelectorModel per EDM
117117 // 3. ApiVersionMetadata has already be computed and added to EndpointMetadata
118118 //
119- // this only becomes a problem when there are multiple EDMs and a single action implementation
120- // maps to more than one EDM.
119+ // this becomes a problem when there are multiple EDMs and a single action implementation
120+ // maps to more than one EDM or a dynamically added OData endpoint is added without ApiVersionMetadata .
121121 //
122122 // REF: https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.Core/src/ApplicationModels/ActionAttributeRouteModel.cs
123123 // REF: https://github.com/OData/AspNetCoreOData/blob/main/src/Microsoft.AspNetCore.OData/Extensions/ActionModelExtensions.cs#L148
124- if ( mapping . Count > 1 )
125- {
126- CopyApiVersionEndpointMetadata ( context . Result . Controllers ) ;
127- }
124+ CopyApiVersionEndpointMetadata ( context . Result . Controllers ) ;
128125
129126 versionedODataOptions . Mapping = mapping ;
130127 }
You can’t perform that action at this time.
0 commit comments