BindPropertyAttribute BindPropertyAttribute BindPropertyAttribute 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 IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IModelNameProvider
    interface IRequestPredicateProvider
Public Class BindPropertyAttribute
Inherits Attribute
Implements IBinderTypeProviderMetadata, IModelNameProvider, IRequestPredicateProvider
Inheritance
BindPropertyAttributeBindPropertyAttributeBindPropertyAttributeBindPropertyAttribute
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() BindPropertyAttribute() BindPropertyAttribute() BindPropertyAttribute()

Properties

BinderType BinderType BinderType BinderType
BindingSource BindingSource BindingSource BindingSource
Name Name Name Name
SupportsGet SupportsGet SupportsGet 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 IRequestPredicateProvider.RequestPredicate IRequestPredicateProvider.RequestPredicate IRequestPredicateProvider.RequestPredicate

Applies to