FromBodyAttribute 类

定义

指定应使用请求正文绑定参数或属性。

public ref class FromBodyAttribute : Attribute, Microsoft::AspNetCore::Mvc::ModelBinding::IBindingSourceMetadata
[System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class FromBodyAttribute : Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata
[System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class FromBodyAttribute : Attribute, Microsoft.AspNetCore.Http.Metadata.IFromBodyMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata
[<System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type FromBodyAttribute = class
    inherit Attribute
    interface IBindingSourceMetadata
[<System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type FromBodyAttribute = class
    inherit Attribute
    interface IBindingSourceMetadata
    interface IFromBodyMetadata
Public Class FromBodyAttribute
Inherits Attribute
Implements IBindingSourceMetadata
Public Class FromBodyAttribute
Inherits Attribute
Implements IBindingSourceMetadata, IFromBodyMetadata
继承
FromBodyAttribute
属性
实现

构造函数

FromBodyAttribute()

指定应使用请求正文绑定参数或属性。

属性

BindingSource

获取 BindingSource

EmptyBodyBehavior

获取或设置一个值,该值决定正文模型绑定是否应将空输入视为有效。

显式接口实现

IFromBodyMetadata.AllowEmpty

指定应使用请求正文绑定参数或属性。

适用于