BindPropertyAttribute Class

Definition

An attribute that can specify a model name or type of IModelBinder to use for binding the associated property.

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
type BindPropertyAttribute = class
    inherit Attribute
    interface IModelNameProvider
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IRequestPredicateProvider
type BindPropertyAttribute = class
    inherit Attribute
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IModelNameProvider
    interface IRequestPredicateProvider
Public Class BindPropertyAttribute
Inherits Attribute
Implements IBinderTypeProviderMetadata, IModelNameProvider, IRequestPredicateProvider
Inheritance
BindPropertyAttribute
Attributes
Implements

Remarks

Similar to ModelBinderAttribute. Unlike that attribute, BindPropertyAttribute applies only to properties and adds an IRequestPredicateProvider implementation that by default indicates the property should not be bound for HTTP GET requests (see also SupportsGet).

Constructors

BindPropertyAttribute()

Properties

BinderType
BindingSource
Name
SupportsGet

Gets or sets an indication the associated property should be bound in HTTP GET requests. If true, the property should be bound in all requests. Otherwise, the property should not be bound in HTTP GET requests.

Explicit Interface Implementations

IRequestPredicateProvider.RequestPredicate

Applies to