ApiControllerAttribute ApiControllerAttribute ApiControllerAttribute ApiControllerAttribute Class

Definition

Indicates that a type and all derived types are used to serve HTTP API responses.

Controllers decorated with this attribute are configured with features and behavior targeted at improving the developer experience for building APIs.

When decorated on an assembly, all controllers in the assembly will be treated as controllers with API behavior.

public ref class ApiControllerAttribute : Microsoft::AspNetCore::Mvc::ControllerAttribute, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata, Microsoft::AspNetCore::Mvc::Infrastructure::IApiBehaviorMetadata
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Infrastructure.IApiBehaviorMetadata
type ApiControllerAttribute = class
    inherit ControllerAttribute
    interface IFilterMetadata
    interface IApiBehaviorMetadata
Public Class ApiControllerAttribute
Inherits ControllerAttribute
Implements IApiBehaviorMetadata, IFilterMetadata
Inheritance
ApiControllerAttributeApiControllerAttributeApiControllerAttributeApiControllerAttribute
Attributes
Implements

Constructors

ApiControllerAttribute() ApiControllerAttribute() ApiControllerAttribute() ApiControllerAttribute()

Applies to