BindAttribute Class¶
Summary¶
This attribute can be used on action parameters and types, to indicate model level metadata.
Inheritance Hierarchy¶
System.Object
System.Attribute
Microsoft.AspNet.Mvc.BindAttribute
Syntax¶
public class BindAttribute : Attribute, _Attribute, IModelNameProvider, IPropertyBindingPredicateProvider
Constructors¶
-
BindAttribute
(System.String[])¶ Creates a new instace of [Microsoft.AspNet.Mvc.BindAttribute](Microsoft.AspNet.Mvc.BindAttribute.yml).
Arguments: - include (System.String[]) – Names of parameters to include in binding.
public BindAttribute(params string[] include)
-
BindAttribute
(System.Type) Creates a new instance of [Microsoft.AspNet.Mvc.BindAttribute](Microsoft.AspNet.Mvc.BindAttribute.yml).
Arguments: - predicateProviderType (System.Type) – The type which implements [Microsoft.AspNet.Mvc.ModelBinding.IPropertyBindingPredicateProvider]().
public BindAttribute(Type predicateProviderType)
-
Properties¶
-
Include
()¶ Gets the names of properties to include in model binding.
Return type: System.String[] public string[] Include { get; }
-
Name
()¶ Represents the model name used during model binding.
Return type: System.String string IModelNameProvider.Name { get; }
-
PredicateProviderType
()¶ Return type: System.Type public Type PredicateProviderType { get; }
-
Prefix
()¶ Allows a user to specify a particular prefix to match during model binding.
Return type: System.String public string Prefix { get; set; }
-
PropertyFilter
()¶ Return type: System.Func{Microsoft.AspNet.Mvc.ModelBinding.ModelBindingContext,System.String,System.Boolean} public Func<ModelBindingContext, string, bool> PropertyFilter { get; }
-