How to: Add a Parameter to a Method
Use a parameter to pass information into the method or to return information from a method. All methods must have at least one parameter. For more information about how to design a parameter to support the type of method that you want to create, see Designing a Business Data Connectivity Model.
When you add a parameter to a method, Visual Studio adds the <Parameter> element to the XML of the model file in your project. For more information about the attributes of a <Parameter> element, see Parameter.
To add a parameter to a method
Add a method to an entity.
On the View menu, click Other Windows, and then click BDC Method Details.
The BDC Method Details window opens. For more information, see BDC Model Design Tools Overview.
In the BDC Method Details window, expand the node of the method, and then expand the Parameters node.
In the Add a Parameter drop down list, click Create Parameter.
A new parameter appears beneath the Parameters node.
Select the name of the parameter.
On the View menu, click Properties Window.
In the Properties window, set the Name property to any name that makes sense. For example, if the method will return customers, you might name the method GetCustomers.
In the BDC Method Details window, click the drop down list that appears for the direction of the parameter, and then click In, InOut, Out, or Return.
For more information about which direction to choose for the type method that you are creating, see Designing a Business Data Connectivity Model.
Modify the type descriptor of the parameter. For more information, see How to: Define the Type Descriptor of a Parameter.