ControllerAttribute Class

Indicates that the type and any derived types that this attribute is applied to are considered a controller by the default controller discovery mechanism, unless Microsoft.AspNetCore.Mvc.NonControllerAttribute is applied to any type in the hierarchy.

Namespace
Microsoft.AspNetCore.Mvc
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class ControllerAttribute : Attribute, _Attribute
class Microsoft.AspNetCore.Mvc.ControllerAttribute