BindAttribute Class¶
This attribute can be used on action parameters and types, to indicate model level metadata.
- Namespace
Microsoft.AspNetCore.Mvc
- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Inheritance Hierarchy¶
System.Object
System.Attribute
Microsoft.AspNetCore.Mvc.BindAttribute
Syntax¶
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class BindAttribute : Attribute, _Attribute, IModelNameProvider, IPropertyFilterProvider
-
class
Microsoft.AspNetCore.Mvc.
BindAttribute
Constructors¶
-
BindAttribute
(System.String[])¶ Creates a new instace of
Microsoft.AspNetCore.Mvc.BindAttribute
.Arguments: include (System.String<System.String>[]) – Names of parameters to include in binding. public BindAttribute(params string[] include)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.BindAttribute.
Include
¶ Gets the names of properties to include in model binding.
Return type: System.String<System.String>[] public string[] Include { get; }
-
Microsoft.AspNetCore.Mvc.BindAttribute.
Name
¶ Represents the model name used during model binding.
Return type: System.String string IModelNameProvider.Name { get; }
-
Microsoft.AspNetCore.Mvc.BindAttribute.
Prefix
¶ Allows a user to specify a particular prefix to match during model binding.
Return type: System.String public string Prefix { get; set; }
-
Microsoft.AspNetCore.Mvc.BindAttribute.
PropertyFilter
¶ Return type: System.Func<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata> public Func<ModelMetadata, bool> PropertyFilter { get; }
-