Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 3.41 KB

how-to-add-a-parameter-to-a-method.md

File metadata and controls

56 lines (41 loc) · 3.41 KB
title description ms.date ms.topic dev_langs helpviewer_keywords author ms.author manager ms.subservice
Add a Parameter to a Method
Know how to add a parameter to a business data connectivity (BDC) method, which lets you pass information into the method or return information from the method.
02/02/2017
how-to
VB
CSharp
Business Data Connectivity service [SharePoint development in Visual Studio], adding a method to a parameter
Business Data Connectivity service [SharePoint development in Visual Studio], parameter
BDC [SharePoint development in Visual Studio], adding a method to a parameter
BDC [SharePoint development in Visual Studio], parameter
Business Data Connectivity service [SharePoint development in Visual Studio], method parameters
BDC [SharePoint development in Visual Studio], method parameters
John-Hart
johnhart
mijacobs
sharepoint-development

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

  1. Add a method to an entity.

  2. On the menu bar, choose View > Other Windows > BDC Method Details.

    The BDC Method Details window opens. For more information, see BDC Model Design Tools Overview.

  3. In the BDC Method Details window, expand the node of the method, and then expand the Parameters node.

  4. In the Add a Parameter list, choose Create Parameter.

    A new parameter appears beneath the Parameters node.

  5. On the menu bar, choose View > Properties Window.

  6. 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.

  7. In the BDC Method Details window, open the list that appears for the direction of the parameter, and then choose In, InOut, Out, or Return.

    For more information about which direction to choose for the type method that you are creating, see Design a business data connectivity model.

  8. Modify the type descriptor of the parameter. For more information, see How to: Define the type descriptor of a parameter.

Related content