<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0-rc.2.20475.5" />

System.ComponentModel.DataAnnotations.DataTypeAttribute

Specifies the name of an additional type to associate with a data field.
public string CustomDataType { get; }

Gets the name of custom field template that is associated with the data field.

public DataType DataType { get; }

Gets the type that is associated with the data field.

public DisplayFormatAttribute DisplayFormat { get; protected set; }

Gets a data-field display format.

public DataTypeAttribute(DataType dataType)

Initializes a new instance of the DataTypeAttribute class by using the specified type name.

public DataTypeAttribute(string customDataType)

Initializes a new instance of the DataTypeAttribute class by using the specified field template name.

public virtual string GetDataTypeName()

Returns the name of the type that is associated with the data field.