dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.62k stars 25.3k forks source link

Incorrect information for <aspnetcore21 #14912

Closed GeorgeAlexandria closed 5 years ago

GeorgeAlexandria commented 5 years ago

The section #add-a-controller describe how to add a new controller for <.aspnetcore21 (in the issue scope younger versions are not interested), it just use ApiControllerAttribute to decorate controller that allow controller responds to web API requests. Besides, ApiControllerAttribute was introduced at aspnetcore21 (https://docs.microsoft.com/ru-ru/dotnet/api/microsoft.aspnetcore.mvc.apicontrollerattribute?view=aspnetcore-2.2#applies-to) and it cannot be used in [.aspnetcore10;.aspnetcore20], so this describes is incorrect for <.aspnetcore21.

If I miss something, please let me know about it.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Rick-Anderson commented 5 years ago

@GeorgeAlexandria thanks for the feedback. We should probably remove the version selector for 1..0 to 2.0 since we don't support those versions.

cc @scottaddie