BindPropertyAttribute Clase

Definición

Atributo que puede especificar un nombre de modelo o un tipo de IModelBinder que se va a usar para enlazar la propiedad asociada.

public ref class BindPropertyAttribute : Attribute, Microsoft::AspNetCore::Mvc::ModelBinding::IBinderTypeProviderMetadata, Microsoft::AspNetCore::Mvc::ModelBinding::IModelNameProvider, Microsoft::AspNetCore::Mvc::ModelBinding::IRequestPredicateProvider
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class BindPropertyAttribute : Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IRequestPredicateProvider
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindPropertyAttribute = class
    inherit Attribute
    interface IModelNameProvider
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IRequestPredicateProvider
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindPropertyAttribute = class
    inherit Attribute
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IModelNameProvider
    interface IRequestPredicateProvider
Public Class BindPropertyAttribute
Inherits Attribute
Implements IBinderTypeProviderMetadata, IModelNameProvider, IRequestPredicateProvider
Herencia
BindPropertyAttribute
Atributos
Implementaciones

Comentarios

Similar a ModelBinderAttribute. A diferencia de ese atributo, BindPropertyAttribute solo se aplica a las propiedades y agrega una IRequestPredicateProvider implementación que, de forma predeterminada, indica que la propiedad no debe enlazarse para las solicitudes HTTP GET (consulte también SupportsGet).

Constructores

BindPropertyAttribute()

Atributo que puede especificar un nombre de modelo o un tipo de IModelBinder que se va a usar para enlazar la propiedad asociada.

Propiedades

BinderType

que Type implementa .IModelBinder

BindingSource

Obtiene la estructura BindingSource.

Name

Nombre del modelo.

SupportsGet

Obtiene o establece una indicación de que la propiedad asociada debe enlazarse en solicitudes HTTP GET. Si truees , la propiedad debe enlazarse en todas las solicitudes. De lo contrario, la propiedad no debe enlazarse en solicitudes HTTP GET.

Implementaciones de interfaz explícitas

IRequestPredicateProvider.RequestPredicate

Atributo que puede especificar un nombre de modelo o un tipo de IModelBinder que se va a usar para enlazar la propiedad asociada.

Se aplica a