Browse Source

Merge pull request #6195 from abpframework/cotur/kebab-case

Fix #6193
pull/6206/head
Halil İbrahim Kalkan 6 years ago
committed by GitHub
parent
commit
e62277724c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalRouteBuilder.cs

18
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalRouteBuilder.cs

@ -134,26 +134,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions
protected virtual string NormalizeIdPropertyNameCase(PropertyInfo property, [CanBeNull] ConventionalControllerSetting configuration) protected virtual string NormalizeIdPropertyNameCase(PropertyInfo property, [CanBeNull] ConventionalControllerSetting configuration)
{ {
if (configuration?.UseV3UrlStyle ?? Options.UseV3UrlStyle) return property.Name;
{
return property.Name;
}
else
{
return property.Name.ToKebabCase();
}
} }
protected virtual string NormalizeSecondaryIdNameCase(ParameterModel secondaryId, [CanBeNull] ConventionalControllerSetting configuration) protected virtual string NormalizeSecondaryIdNameCase(ParameterModel secondaryId, [CanBeNull] ConventionalControllerSetting configuration)
{ {
if (configuration?.UseV3UrlStyle ?? Options.UseV3UrlStyle) return secondaryId.ParameterName;
{
return secondaryId.ParameterName;
}
else
{
return secondaryId.ParameterName.ToKebabCase();
}
} }
} }
} }

Loading…
Cancel
Save