Прочетете на английски

Споделяне чрез


PrecisionAttribute Class

Definition

Configures the precision of data that is allowed in this property. For example, if the property is a Decimal then this is the maximum number of digits.

C#
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public class PrecisionAttribute : Attribute
Inheritance
PrecisionAttribute
Attributes

Remarks

See Modeling entity types and relationships for more information and examples.

Constructors

PrecisionAttribute(Int32, Int32)

Initializes a new instance of the PrecisionAttribute class.

PrecisionAttribute(Int32)

Initializes a new instance of the PrecisionAttribute class.

Properties

Precision

The precision of the property.

Scale

The scale of the property.

Applies to

Продукт Версии
Entity Framework Core 6.0, 7.0, 8.0, 9.0