Skip to content

Commit

Permalink
Use parameterInfo.Name when modelNameProvider.Name is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
maliming authored Jul 9, 2020
1 parent 343895b commit 3199b5d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public string GetMethodParamName(ParameterInfo parameterInfo)
return parameterInfo.Name;
}

return modelNameProvider.Name;
return modelNameProvider.Name ?? parameterInfo.Name;
}

private static string GetRootPath([NotNull] Type controllerType, [CanBeNull] ConventionalControllerSetting setting)
Expand Down

0 comments on commit 3199b5d

Please sign in to comment.