How to: Create Properties

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

Entities are the fundamental building block for describing the structure of data with the Telerik Data Access Domain Model. In a domain model, entities are constructed from properties and describe the structure of top-level concepts, such as a products and categories in a business application.

  • Scalar Properties - properties of a persistent type that map to a single column in the database. Scalar properties are listed inside the collapsible Properties node in the visual representation of the persistent type.
  • Navigation Properties - properties of a persistent class that allow navigation from one end of an association to the other end (e.g. product.Category or category.Products). Navigation properties are listed inside the collapsible Navigation node in the visual representation of the persistent type. For more information, see How to: Create Associations.
  • Implementation Section - a special section that shows all properties derived from a base class or interfaces in an inheritance hierarchy. For more information, see How to: Model Horizontal Inheritance and How to: Model Complex Inheritance.

This topic demonstrates how to create and modify scalar properties in your domain model entities.

How to Create Scalar Properties

You can create a scalar property by using the design surface of the Telerik Data Access Visual Designer. For that purpose, the following steps should be performed:

  1. Right-click a type from the design surface, point to Add, and select Property

  2. A new property is added to the entity.

    By default the property is named PropertyX. The property name must be unique within the entity. Telerik Data Access checks if the entity has a property with the same name and makes the name unique by adding a "0", "1", and so on, to the property name. The default property type is String. When you add a new property, it automatically goes in edit mode, i.e. you could set the property name and type. Note that the property name and type are separated by colon.

How to Modify Property Name and Type

In order to modify a property, the following steps should be performed:

  1. Select the target property in the Visual Designer.
  2. Press F2. The property goes in edit mode. Now, you could change its name and type.

An alternative approach is to use the Property Window:

  1. Again, select the target property in the Visual Designer.
  2. Press the F4 key to open the Property Window.
  3. Modify the Name and Type properties in the Properties pane.

Next Steps

This topic deals with scalar properties only. Navigation properties are created when you add associations between the types. More information could be found in the Working with Associations section.