Delen via


How to: Create and Modify Scalar Properties (Entity Data Model Tools)

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 ADO.NET Entity Data Model Designer (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

Concepts

ADO.NET Entity Data Model Designer

Other Resources

Entity Data Model Tools Tasks