Bagikan melalui


FromBodyAttribute Kelas

Definisi

Menentukan bahwa parameter atau properti harus terikat menggunakan isi permintaan.

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
Warisan
FromBodyAttribute
Atribut
Penerapan

Konstruktor

FromBodyAttribute()

Menentukan bahwa parameter atau properti harus terikat menggunakan isi permintaan.

Properti

BindingSource

BindingSourceMendapatkan .

EmptyBodyBehavior

Mendapatkan atau menetapkan nilai yang memutuskan apakah pengikatan model isi harus memperlakukan input kosong sebagai valid.

Implementasi Antarmuka Eksplisit

IFromBodyMetadata.AllowEmpty

Menentukan bahwa parameter atau properti harus terikat menggunakan isi permintaan.

Berlaku untuk