Property Editor

This dialog box allows you to create and edit properties.

To call Property Editor, use one of the following options:

In the Model Explorer window or in the diagram right-click the required class or complex type to call its context menu, and in the Add submenu select New Property.
In the Model Explorer window or in the diagram select the required class or complex type and press ALT+P.
In the Model Explorer window or in the diagram right-click an existing property and in its context menu select Edit.

Images_Property-Editor-EF-2

The following options are available:

Name - set the property name here.

Type - set the property type. Acceptable values are: Binary, Boolean, Byte, DateTime, DateTimeOffset, Decimal, Double, Guid, Int16, Int32, Int64, SByte, Single, String, Time.

Nullable - select to make the property nullable.

Entity Key - select to include the property to entity key. Not available for complex type properties.

Concurrency check - select to enable 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.

Store Generated - 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 - avalue is generated on both insert and update.

Storage Column - this drop-down list defines the column in the storage model to which the property is mapped; clicking the three-dotted button calls the Storage Column editor dialog that in its turn allows you to edit the storage column.

Facets

Max Length - determines the max length for the string and binary columns.

Unicode - select this check box to set that the column stores data in Unicode format.

Fixed Length - select this check box to indicate that the column stores fixed-length textual or binary data.

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

Scale - defines 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.

Code Generation

Default Value - set the property default value.

Inheritance Modifier - set the property inheritance modifier. Acceptable values are:

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.

Getter - specify the access level for the getter function. Acceptable values are: Public, Protected, Internal, Private, or ProtectedInternal.

Setter - specify the access level for the setter function. Acceptable values are: Public, Protected, Internal, Private, or ProtectedInternal.

Validation

Expression - validates that the property conforms to the specified regular expression.

Format - validates that the property conforms to the selected format.

Length

min - validates the string property minimum length.

max - validates the string property maximum length.

Value

min - validates the property minimum value.

max - validates the property maximum value.

Required - select this check box to indicate that a property value is required.

Documentation - click this button to input summary information about the method.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.