How to: Define the Type Descriptor of a Parameter
A type descriptor contains properties that describe the data type of a parameter. A type descriptor can define a field, an entity, or a collection of entities. For more information, see Type Descriptor.
To define the type descriptor of a parameter
In the BDC Method Details window, select the type descriptor of the parameter.
On the View menu, click Properties Window.
In the Properties window, set the properties of the type descriptor.
The following procedures describe how to define a type descriptor as a field, entity, or entity collection.
To define a field
In the Properties window, set the Name property of the type descriptor to the name of a field in the type that represents the entity (For example: FirstName).
Click the drop-down list next to the TypeName property, and then select the appropriate data type (for example: Int32).
For information about other optional parameters, see Type Descriptor.
To define an entity
In the Properties window, set the Name property to a name that describes the entity (For example: Contact).
Set the TypeName property to the fully qualified name of the type that represents the entity. This type can be a class in your project, a type defined in an assembly that you reference in your solution, or a type defined in the BDC object model.
For a class in your project, click the drop-down list that appears next to the TypeName property, click the Current Project tab, and then select a class in your project.
The fully qualified name includes the namespace and name of the class followed by the name of the LOB system. The following example sets the value of the TypeName property to a class in your project.
MyBDCNamespace.BdcModel1.Contact, BdcModel1
For a type located in an assembly in your solution, the fully qualified name includes the name of the type, the name of the assembly, the version number, the culture, and the public key token.
The following example sets the value of the TypeName property to a type defined in an assembly that you reference in your solution.
MyNamespace.Contact, myAssemblyName, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
For a type defined in the BDC object model, the fully qualified name includes the namespace and name of the type.
The following example sets the value of the TypeName property to a type in the BDC object model.
Microsoft.BusinessData.Runtime.DynamicType
In the BDC Method Details window, click the drop-down list that appears for the type descriptor, and then click Edit.
The BDC Explorer window opens.
In the BDC Explorer, right-click the type descriptor, and then click Add Type Descriptor.
A new type descriptor is added as a child to the entity type descriptor. Configure this type descriptor as a field.
Repeat step 4 to add a child type descriptor for each field of the entity.
To define a collection of entities
In the BDC Method Details window, select the type descriptor of the desired parameter.
On the View menu, click Properties Window.
In the Properties window, set the Name property to a name that describes the entity (For example: Contacts).
Set the IsCollection property to True. This indicates that this type descriptor is a collection of entities.
Set the TypeName property to a string that contains a reference to the IEnumerable<T> interface, and the fully qualified name of the type that represents the entity. This type can be a class in your project, a type defined in an assembly that you reference in your solution, or a type defined in the BDC object model.
For a class in your project, click the drop-down list that appears next to the TypeName property, then, click the Current Project tab, and then select a class in your project.
The fully qualified name includes the namespace and name of the class followed by the name of the LOB system.
The following example sets the value of the TypeName property to a collection of classes in your project.
System.Collections.Generic.IEnumerable`1 [MyBDCNamespace. BdcModel1.Contact, BdcModel1]
For a type located in an assembly in your solution, the fully qualified name includes the name of the type, the name of the assembly, the version number, the culture, and the public key token.
The following example sets the value of the TypeName property to a collection of types in an assembly that you reference in your solution.
System.Collections.Generic.IEnumerable`1 [MyNamespace.Contact, myAssemblyName, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
For a type defined in the BDC object model, the fully qualified name includes only the namespace and name of the type.
The following example sets the value of the TypeName property to a collection of types defined in the BDC object model.
System.Collections.Generic.IEnumerable`1 [Microsoft.BusinessData.Runtime.DynamicType]
In the BDC Method Details window, click the drop down list that appears for the type descriptor, and then click Edit.
The BDC Explorer window opens.
In the BDC Explorer, right-click the type descriptor, and then click Add Type Descriptor.
A new type descriptor is added as a child to the collection type descriptor. Configure this type descriptor as an entity.
See Also
Tasks
How to: Add an Entity to a Model
How to: Add a Parameter to a Method
How to: Define a Method Instance
Concepts
BDC Model Design Tools Overview