File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using System . ComponentModel ;
23using System . Linq ;
34using System . Reflection ;
45using Microsoft . AspNetCore . Mvc . ApplicationModels ;
@@ -35,7 +36,8 @@ public virtual string Build(
3536 var idParameterModel = action . Parameters . FirstOrDefault ( p => p . ParameterName == "id" ) ;
3637 if ( idParameterModel != null )
3738 {
38- if ( TypeHelper . IsPrimitiveExtended ( idParameterModel . ParameterType , includeEnums : true ) )
39+ if ( TypeHelper . IsPrimitiveExtended ( idParameterModel . ParameterType , includeEnums : true )
40+ || TypeDescriptor . GetConverter ( idParameterModel . ParameterType ) . CanConvertFrom ( typeof ( string ) ) )
3941 {
4042 url += "/{id}" ;
4143 }
@@ -156,4 +158,4 @@ protected virtual string NormalizeSecondaryIdNameCase(ParameterModel secondaryId
156158 {
157159 return secondaryId . ParameterName ;
158160 }
159- }
161+ }
You can’t perform that action at this time.
0 commit comments