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 TypeDescriptor.
To define the type descriptor of a parameter
In the BDC Method Details window, choose the type descriptor of the parameter.
On the menu bar, choose View, 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).
In the list next to the TypeName property, choose the appropriate data type (for example, Int32).
For information about other optional parameters, see TypeDescriptor.
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, choose the down arrow next to the TypeName property, choose the Current Project tab in the dialog box that appears, and then choose the 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, open the list that appears for the type descriptor, and then choose Edit.
The BDC Explorer window opens.
In the BDC Explorer, open the shortcut menu of the type descriptor, and then choose 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, choose the type descriptor of the parameter that you want.
On the menu bar, choose View, 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, choose the down arrow next to the TypeName property, choose the Current Project tab in the dialog box that appears, and then choose the 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, open the list that appears for the type descriptor, and then choose Edit.
The BDC Explorer window opens.
In the BDC Explorer, open the shortcut menu of the type descriptor, and then choose Add Type Descriptor.
A new type descriptor is added as a child to the collection type descriptor. Configure this type descriptor as an entity.