This dialog box allows you to add new methods to the model and edit the existing ones.
To call Method Editor, use one of the following options:
• | Right-click the model name in the Model Explorer to call its context menu, and in the Add submenu select New Method. |
• | Right-click the Method node in the Model Explorer to call its context menu, and then select New Method. |
• | On the Model Explorer or on the Model toolbar click the New Method button, or press ALT+M. |
• | In the Model Explorer window right-click an existing method and in its context menu select Edit. |
The following options are available:
Name - specify the name of the method.
Return type - choose the method return type.
None
Defines that no return type is available.
NHibernate types
You can choose one of the NHibernate data types: AnsiChar, AnsiString, Binary, BinaryBlob, Boolean, Byte, Char, CultureInfo, Currency, Date, DateTime, DateTime2, DateTimeOffset, DbTimestamp, LocalDateTime, UtcDateTime, Decimal, Double, Guid, Int16, Int32, Int64, Object, SByte, Serializable, Single, String, StringClog, Ticks, Time, TimeAsTimeSpan, TimeSpan, Timestamp, TrueFalse, Type, UInt16, UInt32, UInt64, YesNo.
Classes
You can choose any class available in the model.
Complex types
You can choose any complex type available in the model.
Enum types
You can choose any enum type available in the model.
Custom type...
You can add a new custom type.
Stored Procedure - select this radio button to create a stored procedure. Enter the name of the procedure in the corresponding field. The stored procedure will be generated automatically and its source will be displayed in the SQL: field. Note that the SQL: field is not editable in this case.
Table-Valued Function - select this check box to indicate that the table returned by the user-defined function will be referenced in the FROM clause of the SQL statement.
SQL - select this radio button to manually enter the SQL query in the corresponding field. Note that the Stored Procedure: field and the Table-Valued Function check box are disabled for editing in this case.
The following options are available:
Parameter Name - the list of the method parameters.
Add - adds a new parameter to the list.
Remove - removes the selected parameter.
Name - specify the parameter name here.
Type - select the data type of the parameter it will take in the model. Acceptable values are AnsiChar, AnsiString, Binary, BinaryBlob, Boolean, Byte, Char, CultureInfo, Currency, Date, DateTime, DateTime2, DateTimeOffset, DbTimestamp, LocalDateTime, UtcDateTime, Decimal, Double, Guid, Int16, Int32, Int64, Object, SByte, Serializable, Single, String, StringClog, Ticks, Time, TimeAsTimeSpan, TimeSpan, Timestamp, TrueFalse, Type, UInt16, UInt32, UInt64 and YesNo.
Direction - select the direction. Acceptable values are: Input, Output, or InputOutput.
Source - specify the name of the related stored function in the database.
Server Type - specify the name of the stored procedure parameter type in the database. This field is available only for stored procedures and is required for correct operation of Update From Database Wizard.
Documentation - click this button to input summary information about the method.