How to add/edit a typed view definition

Adding a Typed View Definition

Typed Views are always added through reverse engineering. To reverse engineer one or more elements (Tables, Views or Stored procedure resultsets) to Typed View definitions, right-click in the Catalog Explorer, the catalog, schema, tables, views or stored procedures nodes and choose the reverse engineering menu option for the elements you want to reverse engineer.

This will bring up the Reverse Engineering Element Editor. You can also right-click a single table/view or stored procedure / stored procedure resultset or a selection of these elements to bring up the context menu with the reverse engineering menu items.

Adding a Typed View Definition mapped onto a Table Valued Function resultset

Adding a Typed View mapped onto a table valued function resultset is a little bit different. To add a typed view mapped onto a table valued function resultset, select all table valued functions you want the resultsets to reverse engineer as typed views and right-click the selection and select Create Table Valued Function Call Definitions. This will create a new Typed View per selected Table Valued Function and also will add a call to the selected Table Valued Function.

The procedure is slightly different from mapping a typed view onto a stored procedure resultset because the typed view and the table valued function call are tightly coupled, while a stored procedure can also be added without a typedview mapped onto its resultset.

Editing a Typed View Definition

To edit a Typed View definition, right-click in Project Explorer the typed view to edit in the Typed Views list and choose 'Edit...' from the context menu. This will open the Typed View Editor.

The General Typed View Editor

The designer also offers a General Typed View Editor. This is a special kind of typed view editor which allows you to edit the typed view which is currently selected in the project explorer. This editor is opened by selecting Project -> General Typed View Editor in the menu, or by clicking the button in the toolbar.

The advantage of the General Typed View Editor is that it keeps the current sub tab selected when you select another typed view in the project explorer, which allows you to e.g. edit the mappings of several typed views without a lot of clicking through tabs.