Hi @Amit,
I just wanted to confirm whether appending "Controller" as a suffix is simply a naming convention, or if there are any potential consequences for not following it. Even though my .NET 6 application seems to function without issue currently.
You can check the official document to know what is a controller. A controller is an instantiable class, usually public, in which at least one of the following conditions is true:
- The class name is suffixed with
Controller
. - The class inherits from a class whose name is suffixed with
Controller
. - The
[Controller]
attribute is applied to the class.
So, there is no potential consequences for do not add the suffix if the class is inherits from Controller
.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Rena