How to: Create and Modify Scalar Properties
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
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.
- The type of the new scalar property is set to Int16.
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
Select the scalar property.
The scalar property information is displayed in the Properties window.
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.
Select one or more scalar properties and press the DELETE key.