Data Access has been discontinued. Please refer to this page for more information.

How to: Create Interfaces

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.

This topic demonstrates how to create and modify interfaces in your domain model.

How to Create Interfaces

The designer, when empty, contains a simple message, which states that to create new entities you need to drag them from the Toolbox Items. The Toolbox contains, besides the Pointer, several controls, or items, from which to design your domain model. One of these items is the Interface item. To create a new interface in the domain model, simply drag the Interface item from the Toolbox to the design surface.

When you drag the Interface item from the Toolbox, a new interface is created in the domain model. By default the interface is named InterfaceX. The interface name must be unique for the domain model. Telerik Data Access checks if the domain model has an interface with the same name and makes the name unique by adding a "0", "1", and so on, to the name. When you save the domain model, a new interface with the same name will be created.

How to: Rename Interfaces

By default the interface is named InterfaceX, e.g. Interface1, Interface2, etc.

To rename an interface:

  1. Select the target interface in the Visual Designer.
  2. Press the F2 key. The interface goes in edit mode. Now, you could change the interface name.

An alternative approach is to use the Property Window:

  1. Select the target interface in the Visual Designer.
  2. Press the F4 key to open the Properties pane.
  3. Modify the Name property in the Properties pane.

When to Use Interfaces

In most of the cases, you will use interfaces in the context of inheritance. For more information, check out How to: Model Complex Inheritance with the Visual Designer.