BindRequiredAttribute 类

定义

指示模型绑定需要属性。 当应用于某个属性时,模型绑定系统要求该属性具有值。 应用于类型时,模型绑定系统需要该类型定义的所有属性的值。

public ref class BindRequiredAttribute sealed : Microsoft::AspNetCore::Mvc::ModelBinding::BindingBehaviorAttribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class BindRequiredAttribute : Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehaviorAttribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class BindRequiredAttribute : Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehaviorAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindRequiredAttribute = class
    inherit BindingBehaviorAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindRequiredAttribute = class
    inherit BindingBehaviorAttribute
Public NotInheritable Class BindRequiredAttribute
Inherits BindingBehaviorAttribute
继承
BindRequiredAttribute
属性

构造函数

BindRequiredAttribute()

初始化一个新 BindRequiredAttribute 实例。

属性

Behavior

获取 BindingBehavior 要应用的 。

(继承自 BindingBehaviorAttribute)

适用于