Property properties

Entity Framework class property has the following properties.

Code generation

Attributes – Attributes of the object.

Documentation

  • LongDescription – Detailed description of the property.
  • Summary – Brief description of the property.

Getter – Specifies access modifier for the getter method. Can accept the following values: Public, ProtectedInternal, Internal, Protected, Private.

Inheritance Modifier – Property inheritance modifier. The Inheritance Modifier property can take the None, New, NewVirtual, Override, Virtual, or SealedOverride value.

  • None – The default value. No inheritance modification is performed.
  • New – Specifies that the derived base class property with this name is explicitly hidden.
  • NewVirtual – Specifies that the derived base class property with this signature is explicitly hidden, and this property of this class can be overridden in the derived class.
  • Override – Specifies that the property overrides the one derived from the base class.
  • Virtual – Specifies that the property can be overridden in the derived class.
  • SealedOverride – Specifies that overriding the virtual method is forbidden for the subclass.

Setter – Specifies access modifier for the setter method. Can accept the following values: Public, ProtectedInternal, Internal, Protected, Private.

Database script generation

Store Generated Pattern – Determines if the column needs a value during insert and update operations, or it is autogenerated. Can accept the following values:

  • None – It is not a server generated property. This is the default value.
  • Identity – A value is generated on insert and remains unchanged on update.
  • Computed – A value is generated on both insert and update.

Facets

Fixed Length – Indicates that the column stores fixed-length textual or binary data. Can accept the following values: True or False.

Max Length – Displays max length for the string and binary columns.

Precision – Displays the maximal number of digits used by the column data type. Applicable to the numeric fields.

Scale – Displays the number of digits to the right of the decimal point in a number used by the column data type. Applicable to the numeric fields.

Unicode – Specifies that the column stores data in Unicode format. Can accept the following values: True or False

General

Concurrency Mode – Controls concurrency check for the property. Can accept the following values:

  • None – Disables concurrency check for the property.
  • Fixed – Enables concurrency check for the property. The auto-generated SQL statement compares the original value that was queried from the database to the current value in the data store. If there are any conflicts, an exception is thrown.

Default Value – The default value of the property.

Entity Key – Indicates whether the column is a part of an entity key. Can accept the following values: True or False

Name – Property name.

Nullable – Determines whether this property is nullable. Can accept the following values: True or False

Type – Property type. Can accept the following values: Binary, Boolean, Byte, DateTime, DateTimeOffset, Decimal, Double, Guid, Int16, Int32, Int64, SByte, Single, String, Time.

Validation

Validate Expression – Validates that the property conforms to the specified regular expression.

Validate Format – Validates that the property conforms to the selected format.

Validate Max Length – Validates the string property maximum length.

Validate Max Value – Validates the property maximum value.

Validate Min Length – Validates the string property minimum length.

Validate Min Value – Validates the property minimum value.

Validate Required – Specifies whether a property value is required. Can accept the following values: True or False.

See also

  • Object properties

  • Creating and editing properties