System.ComponentModel.DataAnnotations namespace

Provides feature classes for defining metadata for ASP.NET MVC and ASP.NET data controls.

class

Field Description
AssociatedMetadataTypeTypeDescriptionProvider By adding the characteristics and attribute information defined in the associated class, the metadata information of a certain class can be extended.
AssociationAttribute The specified entity members represent data relationships (such as foreign key relationships).
CompareAttribute Provides features for comparing two attributes.
ConcurrencyCheckAttribute The specified attribute participates in the optimistic concurrency check.
CreditCardAttribute The specified data field value is a credit card number.
CustomValidationAttribute Specify a custom verification method used to verify attributes or class instances.
DataTypeAttribute Specify the name of the other type to be associated with the data field.
DisplayAttribute Provides common features that allow localizable strings to be specified for the types and members of entity partial classes.
DisplayColumnAttribute Specify the column that is displayed in the referenced table as a foreign key column.
DisplayFormatAttribute Specify how ASP.NET dynamic data displays data fields and how to format the data fields.
EditableAttribute Indicates whether the data field is editable.
EmailAddressAttribute Verify email address.
EnumDataTypeAttribute Enable .NET enumeration to map to data columns.
FileExtensionsAttribute Verify the file extension.
FilterUIHintAttribute Represents the characteristics used to specify the filtering behavior of the column.
KeyAttribute Represents one or more attributes that uniquely identify an entity.
MaxLengthAttribute Specify the maximum length of the array or string data allowed in the attribute.
MetadataTypeAttribute Specify the metadata class to be associated with the data model class.
MinLengthAttribute Specify the minimum length of the array or string data allowed in the attribute.
PhoneAttribute The specified data field value is a standard telephone number.
RangeAttribute Specify numeric range constraints for the value of the data field.
RegularExpressionAttribute The value of the data field in the specified ASP.NET dynamic data must match the specified regular expression.
RequiredAttribute Specifying the data field value is required.
ScaffoldColumnAttribute Specify whether the class or data column uses scaffolding.
StringLengthAttribute Specify the minimum and maximum length of characters allowed in the data field.
TimestampAttribute The data type of the column is specified as the row version.
UIHintAttribute Specify the template or user control that dynamic data uses to display data fields.
UrlAttribute Provide URL verification.
ValidationAttribute Serves as the base class for all verification features.
ValidationContext Describe the context in which the verification check is performed.
ValidationException Represents an exception that occurs when validating a data field using the ValidationAttribute class.
ValidationResult A container that represents the result of a verification request.
Validator Define a helper class that can be used to validate these items when the class is included in the ValidationAttribute attribute associated with objects, attributes, and methods.

interface

Field Description
IValidatableObject Provide methods for verifying objects.

enumerate

Field Description
DataType Represents an enumeration of data types associated with data fields and parameters.

Guess you like

Origin blog.csdn.net/WuLex/article/details/111987849