Stored Procedure Mapping

Use the Stored Procedure Mapping dialog box to setup mapping functions. Note that it is available only when your model contains stored procedures.

To access this dialog box, right-click the entity and choose Stored Procedure Mapping from the popup menu.

Images_configure-behavior-ef

The following options are available:

Commands - choose the required command from the list. Acceptable values are:

Insert - select stored procedure for insert operations.

Update - select stored procedure for update operations.

Delete - select stored procedure for delete operations.

Mapping

Hide mapped - selecting this check box hides stored procedures that are already used in the model for Insert/Update/Delete mapping or as a method of the conceptual model.

Hide inappropriate - selecting this check box hides stored procedures that are likely not to fit for mapping of certain action for a specific class.

This option filters the list of stored procedures in order not to display stored procedures:

having more than one InOut/Out parameter;
having only one Out parameter, but with non-integer valued numeric type;
having the number of In parameters greater than the number of class properties;
having the number of In parameters less than:
the number of properties in EntityKey of the class (for DELETE);
the total amount of properties, ignoring Identity and Computed (for INSERT);
the total amount of properties, ignoring Identity and Computed, but taking into account EntityKey properties (for UPDATE);
having the set of In parameters that does not correspond to the set of entity data types, as:
the total presence of parameters is mandatory with types that correspond to types of class EntityKey properties and optionally parameters are possible with types that correspond to the rest of properties (for DELETE);
the total presence of parameters is mandatory with types that correspond to types of regular class properties and optionally parameters are possible with types that correspond to Identity and Computed properties (for INSERT);
the total presence of parameters is mandatory with types that correspond to types of regular class properties and EntityKey class properties, and optionally parameters are possible with types that correspond to Identity and Computed properties (for UPDATE).

Storage Procedure - select the required stored procedure from the drop-down list.

Below the list the mapping of the stored procedure parameters and entity properties is displayed.

Rows Affected Parameter - set the name of the parameter into which the number of inserted\updated\deleted rows will be written when executing a modification operation.

Result Column Bindings - set binding for the result set here. If the function returns a column set, you can set bindings of the returned columns and entity properties.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.