Export (0) Print
Expand All

How to: Create and Modify Scalar Properties

[This page is specific to the latest version of the Entity Framework. The latest version is available as the 'Entity Framework' NuGet package. For more information, see Entity Framework Releases and Versioning.]

Scalar properties are properties of an entity that map to a single field in the storage model. Scalar properties are listed inside a collapsible node in the visual representation of the entity type. This topic describes how to use the Entity Designer to add, delete, and modify scalar properties.

Add a Scalar Property

You can create scalar properties by using the Entity Designer design surface.

To add a scalar property to an entity

  1. Right-click the entity, point to Add , and select Scalar Property .

    A new scalar property is added to the entity with the following properties:

    • The type of the new scalar property is set to Int16 .

    • The Nullable property is set to true .

    • The Entity Key is set to false (the new scalar property is not part of the entity key).

    • The name of the property is set to "Property" followed by a number to make the name unique in the entity and its hierarchy.

    • The property is in edit mode.

  2. Replace the auto-generated name for the new scalar property.

Edit a Scalar Property

You can edit scalar properties by using the Properties window.

To edit a scalar property

  1. Select the scalar property.

    The scalar property information is displayed in the Properties window.

  2. Make any changes in the Properties window.

Delete a Scalar Property

You can delete scalar properties by using the Entity Designer design surface.

To delete a scalar property

  • Right-click the property and select Delete .

    -or-

  • Select one or more scalar properties and press the DELETE key.

See Also




Build Date:

2013-06-19
Show:
© 2014 Microsoft