Os metadados SampleWebService
Este tópico contém os completo metadados XML para o Sample Web Service. Como você sabe, ele ilustra vários serviço da Web complexos-relacionado conceitos de Business Data Catalog. Para melhor compreender o exemplo, siga as etapas explicação passo a passo e revisar os comentários nos metadados SampleWebService SampleWebService XML.
Microsoft Office SharePoint Server 2007 SDK download . Antes de importar os metadados, publicá-lo em um servidor Web e atualização de WSDLFetchURL WSDLFetchURL propriedade adequadamente. A origem para o SampleWebService serviço da Web também está incluída na
Os metadados
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- This XML defines the metadata for the SampleWebService Web
service defined in the SDK. This demonstrates several complex concepts
related to metadata authoring.-->
<!-- The Business Data Catalog uses the LOB system name as the
application name in the Administation user interface.-->
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Type="WebService" Version="1.0.0.0" name="SampleWebService" xmlns="https://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
<Properties>
<!-- The Web Service proxy namespace name you specify here
is used by the Business Data Catalog when it generates the
proxy.-->
<Property name="WebServiceProxyNamespace" Type="System.String">SampleWebServiceProxy</Property>
<!-- Enter the wildcard character that your Web methods
support. The Business Data Catalog uses the wildcard
character with filters.-->
<Property name="WildcardCharacter" Type="System.String">$</Property>
<!-- URL to WSDL or ASMX.-->
<Property name="WsdlFetchUrl" Type="System.String">http://YourWebServerName/Service.asmx</Property>
</Properties>
<LobSystemInstances>
<!-- The LOB instance name is used by business data clients in the
entity picker, and so on.-->
<LobSystemInstance name="SampleWebServiceInstance">
<Properties>
<Property name="LobSystemName" Type="System.String">SampleWebService</Property>
</Properties>
</LobSystemInstance>
</LobSystemInstances>
<Entities>
<!-- Defines the entity called Address. The Address structure is
part of the customer structure returned by the GetCustomerByID Web
method.-->
<!-- By defining an entity for Address, we can model an association
and return the addresses for each customer.-->
<!-- Because this entity is used only in association methods, we
do not need any other methods.-->
<!-- The association method reuses the GetCustomerByID method of
the Customer entity to return the address collection.-->
<Entity EstimatedInstanceCount="10000" name="Address">
<Properties>
<Property name="Title" Type="System.String">StateProvince</Property>
</Properties>
<!--This entity does not have any identifier as we just want to
display a list of addresses for a customer. -->
<!--This means that it's just a blob of data - you cannot run
actions on this entity, use the entity instance picker, relate
with it, cannot search or crawl it, and so on. -->
<Methods>
<!-- Dummy finder for Address entity. -->
<Method name="GetAddresses">
<Parameters>
<Parameter Direction="Return" name="Addresses">
<TypeDescriptor Typename="SampleWebServiceProxy.CustomerAddress[], SampleWebService" IsCollection="true" name="CustomerAddresses" >
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.CustomerAddress, SampleWebService" name="CustomerAddress" >
<Properties>
<Property name="ComplexFormatting" Type="System.String" />
<Property name="FormatString" Type="System.String">{0}, {1}, {2}, {3} - PostalCode, {4}</Property>
</Properties>
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.CustomerStreet, SampleWebService" name="Street">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" name="BlockNumber" />
<TypeDescriptor Typename="System.String" name="Street" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor Typename="System.String" name="City" />
<TypeDescriptor Typename="System.String" name="StateProvince" />
<TypeDescriptor Typename="System.String" name="CountryRegion" />
<TypeDescriptor Typename="System.String" name="PostalCode" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParametername="Addresses" ReturnTypeDescriptorname="CustomerAddresses" ReturnTypeDescriptorLevel="0" name="GetAddressesInstance" />
</MethodInstances>
</Method>
</Methods>
</Entity>
<!-- The Customer entity has IDEnumerator,
Finder, and SpecificFinder.-->
<!-- The Customer return structure from the Web method
GetCustomerByID also contains an address collection that is used
to get addresses for a customer.-->
<!-- The Customer entity also demonstrates the self-referential entity
association concept - cusomers have child customers. The
GetChildCustomersForCustomer method is the association method.-->
<Entity EstimatedInstanceCount="10000" name="Customer">
<Properties>
<Property name="Title" Type="System.String">Name</Property>
</Properties>
<Identifiers>
<Identifier Typename="System.String" name="CustomerID" />
</Identifiers>
<Methods>
<!--Demonstrates the self-referential entity association
concept.-->
<!--Each customer in the back-end data source has a
ParentCustomerID.-->
<Method name="GetChildCustomersForCustomer">
<Parameters>
<!--Parameter names are tokens used by the Business
Data Catalog. You can name them anything.-->
<!--TypeDescriptor names must match the back-end input and
output structures' or fields' names.-->
<Parameter Direction="In" name="custid">
<TypeDescriptor Typename="System.String" Identifiername="CustomerID" name="custid" />
</Parameter>
<Parameter Direction="Return" name="Customers">
<!-- The TypeName attribute takes the type and the LOB
system name for complex types.-->
<!-- The IsCollection is true here because the customer
array is a collection of customers.-->
<!-- The TypeDescriptor with IsCollection= true can have
only one child.-->
<TypeDescriptor Typename="SampleWebServiceProxy.Customer[], SampleWebService" IsCollection="true" name="ArrayOfCustomer">
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.Customer, SampleWebService" name="Customer">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="CustomerID" name="CustomerID" />
<TypeDescriptor Typename="System.String" name="Name" />
<TypeDescriptor Typename="System.Int64" name="WorkPhoneNumber" />
<TypeDescriptor Typename="System.Int64" name="MobilePhoneNumber" />
<TypeDescriptor Typename="System.String" name="Industry" />
<TypeDescriptor Typename="System.String" name="WebSite" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
</Method>
<Method name="GetCustomerIDs">
<Parameters>
<Parameter Direction="Return" name="CustomerIDs">
<TypeDescriptor Typename="System.String[]" IsCollection="true" name="ArrayOfString">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="CustomerID" name="CustomerID" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="IdEnumerator" ReturnParametername="CustomerIDs" ReturnTypeDescriptorname="ArrayOfString" ReturnTypeDescriptorLevel="0" name="GetCustomerIDsInstance" />
</MethodInstances>
</Method>
<Method name="GetCustomers">
<FilterDescriptors>
<FilterDescriptor Type="Wildcard" name="Name" />
<!-- Limit filter tells Business Data Catalog to bring back
only the specified number of rows back from the LOB
application.-->
<!-- Notice that the back-end method should support this
functionality to return only the specified number of rows.
For a sample, see SampleWebService.-->
<FilterDescriptor Type="Limit" name="Limit" />
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" name="name">
<TypeDescriptor Typename="System.String" AssociatedFilter="Name" name="name" />
</Parameter>
<Parameter Direction="In" name="limit">
<TypeDescriptor Typename="System.Int32" AssociatedFilter="Limit" name="limit" />
</Parameter>
<Parameter Direction="Return" name="Customers">
<TypeDescriptor Typename="SampleWebServiceProxy.Customer[], SampleWebService" IsCollection="true" name="ArrayOfCustomer">
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.Customer, SampleWebService" name="Customer">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="CustomerID" name="CustomerID" />
<TypeDescriptor Typename="System.String" name="Name" />
<TypeDescriptor Typename="System.Int64" name="WorkPhoneNumber" />
<TypeDescriptor Typename="System.Int64" name="MobilePhoneNumber" />
<TypeDescriptor Typename="System.String" name="Industry" />
<TypeDescriptor Typename="System.String" name="WebSite" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParametername="Customers" ReturnTypeDescriptorname="ArrayOfCustomer" ReturnTypeDescriptorLevel="0" name="FindCustomerInstances" />
</MethodInstances>
</Method>
<Method name="GetCustomerByID">
<!--SpecificFinder for customer.-->
<!--The GetCustomerByID is also reused as an association method for getting addresses of a customer.-->
<Parameters>
<Parameter Direction="In" name="id">
<TypeDescriptor Typename="System.String" Identifiername="CustomerID" name="id" />
</Parameter>
<Parameter Direction="Return" name="Customer">
<TypeDescriptor Typename="SampleWebServiceProxy.Customer, SampleWebService" name="Customer">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="CustomerID" name="CustomerID" />
<TypeDescriptor Typename="System.String" name="Name" />
<TypeDescriptor Typename="System.Int64" name="WorkPhoneNumber" />
<TypeDescriptor Typename="System.Int64" name="MobilePhoneNumber" />
<TypeDescriptor Typename="System.String" name="Industry" />
<TypeDescriptor Typename="System.String" name="WebSite" />
<!--The Customer structure also contains a collection
of addresses for the customer. -->
<!--Return parameters can have multiple TypeDescriptors with IsCollection=true. This is an example of that.-->
<!--When Business Data Caltalog executes the SpecificFinder, it ignores the addresses collection because it is a collection.-->
<!--When this same method is used to get addresses for a customer in an association, the return TypeDecriptor name is specified as CustomerAddresses.-->
<TypeDescriptor Typename="SampleWebServiceProxy.CustomerAddress[], SampleWebService" IsCollection="true" name="CustomerAddresses" >
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.CustomerAddress, SampleWebService" name="CustomerAddress" >
<Properties>
<!--Business Data clients can display only primitives and flat structures by default.-->
<!--To display the Street structure that is part of the Address, we use ComplexFormatting.-->
<!--To use ComplexFormatting, you must
enable it at the TypeDescriptor that
contains the struct as shown below.-->
<Property name="ComplexFormatting" Type="System.String" />
</Properties>
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.CustomerStreet, SampleWebService" name="Street">
<Properties>
<!--After ComplexFormatting is
enabled in the container of this struct,
define the format here.-->
<!--{0}, {1} stand for BlockNumber and Street of the Street struct. -->
<Property name="FormatString" Type="System.String">{0}, {1}</Property>
</Properties>
<TypeDescriptors>
<TypeDescriptor Typename="System.String" name="BlockNumber" />
<TypeDescriptor Typename="System.String" name="Street" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor Typename="System.String" name="City" />
<TypeDescriptor Typename="System.String" name="StateProvince" />
<TypeDescriptor Typename="System.String" name="CountryRegion" />
<TypeDescriptor Typename="System.String" name="PostalCode" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="SpecificFinder" ReturnParametername="Customer" ReturnTypeDescriptorname="Customer" ReturnTypeDescriptorLevel="0" name="FindCustomerInstance" />
<!--Association is defined at the bottom.-->
</MethodInstances>
</Method>
</Methods>
</Entity>
<Entity EstimatedInstanceCount="10000" name="Region">
<Properties>
<Property name="Title" Type="System.String">Name</Property>
</Properties>
<Identifiers>
<Identifier Typename="System.String" name="RegionID" />
</Identifiers>
<Methods>
<Method name="GetRegions">
<FilterDescriptors>
<FilterDescriptor Type="Wildcard" name="Name" />
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" name="name">
<TypeDescriptor Typename="System.String" AssociatedFilter="Name" name="name" />
</Parameter>
<Parameter Direction="Return" name="Regions">
<TypeDescriptor Typename="SampleWebServiceProxy.Region[], SampleWebService" IsCollection="true" name="ArrayOfRegion">
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.Region, SampleWebService" name="Region">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="RegionID" name="RegionID" />
<TypeDescriptor Typename="System.String" name="Name" />
<TypeDescriptor Typename="System.String" name="Group" />
<TypeDescriptor Typename="System.Decimal" name="SalesLastYear" />
<TypeDescriptor Typename="System.Decimal" name="SalesYTD" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParametername="Regions" ReturnTypeDescriptorname="ArrayOfRegion" ReturnTypeDescriptorLevel="0" name="FindRegionInstances" />
</MethodInstances>
</Method>
<Method name="GetRegionByID">
<Parameters>
<Parameter Direction="In" name="id">
<TypeDescriptor Typename="System.String" Identifiername="RegionID" name="id" />
</Parameter>
<Parameter Direction="Return" name="Region">
<TypeDescriptor Typename="SampleWebServiceProxy.Region, SampleWebService" name="Region">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="RegionID" name="RegionID" />
<TypeDescriptor Typename="System.String" name="Name" />
<TypeDescriptor Typename="System.String" name="Group" />
<TypeDescriptor Typename="System.Decimal" name="SalesLastYear" />
<TypeDescriptor Typename="System.Decimal" name="SalesYTD" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="SpecificFinder" ReturnParametername="Region" ReturnTypeDescriptorname="Region" ReturnTypeDescriptorLevel="0" name="FindRegionInstance" />
</MethodInstances>
</Method>
</Methods>
</Entity>
<Entity EstimatedInstanceCount="10000" name="Order">
<Properties>
<Property name="Title" Type="System.String">OrderID</Property>
</Properties>
<Identifiers>
<Identifier Typename="System.String" name="OrderID" />
</Identifiers>
<Methods>
<!--Association method - Demonstrates an assoication that has
two sources - Customer and Region.-->
<!--Also demonstrates that you can have filters in association
methods as well.-->
<Method name="GetOrdersForCustomerAndRegion">
<FilterDescriptors>
<FilterDescriptor Type="Comparison" name="CurrencyCode" >
<Properties>
<Property name="Comparator" Type="System.String">Equals</Property>
</Properties>
</FilterDescriptor>
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" name="custid">
<!--Specify the IdentifierEntityName when the identifier
you want to point to is not in the local entity. -->
<!--In this case, the input parameters for this
association are the foreign keys from the Customer and
Region entities.-->
<TypeDescriptor Typename="System.String" Identifiername="CustomerID" IdentifierEntityname="Customer" name="custid" />
</Parameter>
<Parameter Direction="In" name="regid">
<TypeDescriptor Typename="System.String" Identifiername="RegionID" IdentifierEntityname="Region" name="regid" />
</Parameter>
<Parameter Direction="In" name="curcode">
<TypeDescriptor Typename="System.String" AssociatedFilter="CurrencyCode" name="curcode" />
</Parameter>
<Parameter Direction="Return" name="Orders">
<TypeDescriptor Typename="SampleWebServiceProxy.Order[], SampleWebService" IsCollection="true" name="ArrayOfOrder">
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.Order, SampleWebService" name="Order">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="OrderID" />
<TypeDescriptor Typename="System.String" name="CustomerID" />
<TypeDescriptor Typename="System.String" name="RegionID" />
<TypeDescriptor Typename="System.String" name="CurrencyCode" />
<TypeDescriptor Typename="System.Decimal" name="SubTotal" />
<TypeDescriptor Typename="System.String" name="OrderDate" />
<TypeDescriptor Typename="System.String" name="ShipDate" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
</Method>
<Method name="GetOrderByID">
<Parameters>
<Parameter Direction="In" name="id">
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="id" />
</Parameter>
<Parameter Direction="Return" name="Order">
<TypeDescriptor Typename="SampleWebServiceProxy.Order, SampleWebService" name="Order">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="OrderID" />
<TypeDescriptor Typename="System.String" name="CustomerID" />
<TypeDescriptor Typename="System.String" name="RegionID" />
<TypeDescriptor Typename="System.String" name="CurrencyCode" />
<TypeDescriptor Typename="System.Decimal" name="SubTotal" />
<TypeDescriptor Typename="System.String" name="OrderDate" />
<TypeDescriptor Typename="System.String" name="ShipDate" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="SpecificFinder" ReturnParametername="Order" ReturnTypeDescriptorname="Order" ReturnTypeDescriptorLevel="0" name="FindOrderInstance" />
</MethodInstances>
</Method>
<Method name="GetOrders">
<Parameters>
<Parameter Direction="Return" name="Orders">
<TypeDescriptor Typename="SampleWebServiceProxy.Order[], SampleWebService" IsCollection="true" name="ArrayOfOrder">
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.Order, SampleWebService" name="Order">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="OrderID" />
<TypeDescriptor Typename="System.String" name="CustomerID" />
<TypeDescriptor Typename="System.String" name="RegionID" />
<TypeDescriptor Typename="System.String" name="CurrencyCode" />
<TypeDescriptor Typename="System.Decimal" name="SubTotal" />
<TypeDescriptor Typename="System.String" name="OrderDate" />
<TypeDescriptor Typename="System.String" name="ShipDate" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParametername="Orders" ReturnTypeDescriptorname="ArrayOfOrder" ReturnTypeDescriptorLevel="0" name="FindOrderInstances" />
</MethodInstances>
</Method>
</Methods>
</Entity>
<!--This entity demonstrates the use of multiple
identifiers.-->
<!--OrderID is a foriegn key from Order.-->
<Entity EstimatedInstanceCount="10000" name="LineItem">
<Properties>
<Property name="Title" Type="System.String">ProductName</Property>
</Properties>
<Identifiers>
<Identifier Typename="System.String" name="OrderID" />
<Identifier TypeName ="System.String" name="ProductID" />
</Identifiers>
<Methods>
<Method name="GetLineItemsForOrder">
<Parameters>
<Parameter Direction="In" name="ordid">
<TypeDescriptor Typename="System.String" Identifiername="OrderID" IdentifierEntityname="Order" name="ordid" />
</Parameter>
<Parameter Direction="Return" name="LineItems">
<TypeDescriptor Typename="SampleWebServiceProxy.LineItem[], SampleWebService" IsCollection="true" name="ArrayOfLineItem">
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.LineItem, SampleWebService" name="LineItem">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="OrderID" />
<TypeDescriptor Typename="System.String" Identifiername="ProductID" name="ProductID" />
<TypeDescriptor Typename="System.String" name="ProductName" />
<TypeDescriptor Typename="System.Int32" name="OrderQty" />
<TypeDescriptor Typename="System.Decimal" name="UnitPrice" />
<TypeDescriptor Typename="System.Decimal" name="LineTotal" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
</Method>
<Method name="GetLineItemByID">
<Parameters>
<Parameter Direction="In" name="ordid">
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="ordid" />
</Parameter>
<Parameter Direction="In" name="prodid">
<TypeDescriptor Typename="System.String" Identifiername="ProductID" name="prodid" />
</Parameter>
<Parameter Direction="Return" name="LineItem">
<TypeDescriptor Typename="SampleWebServiceProxy.LineItem, SampleWebService" name="LineItem">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="OrderID" />
<TypeDescriptor Typename="System.String" Identifiername="ProductID" name="ProductID" />
<TypeDescriptor Typename="System.String" name="ProductName" />
<TypeDescriptor Typename="System.Int32" name="OrderQty" />
<TypeDescriptor Typename="System.Decimal" name="UnitPrice" />
<TypeDescriptor Typename="System.Decimal" name="LineTotal" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="SpecificFinder" ReturnParametername="LineItem" ReturnTypeDescriptorname="LineItem" ReturnTypeDescriptorLevel="0" name="FindLineItemInstance" />
</MethodInstances>
</Method>
<Method name="GetLineItems">
<Parameters>
<Parameter Direction="Return" name="LineItems">
<TypeDescriptor Typename="SampleWebServiceProxy.LineItem[], SampleWebService" IsCollection="true" name="ArrayOfLineItem">
<TypeDescriptors>
<TypeDescriptor Typename="SampleWebServiceProxy.LineItem, SampleWebService" name="LineItem">
<TypeDescriptors>
<TypeDescriptor Typename="System.String" Identifiername="OrderID" name="OrderID" />
<TypeDescriptor Typename="System.String" Identifiername="ProductID" name="ProductID" />
<TypeDescriptor Typename="System.String" name="ProductName" />
<TypeDescriptor Typename="System.Int32" name="OrderQty" />
<TypeDescriptor Typename="System.Decimal" name="UnitPrice" />
<TypeDescriptor Typename="System.Decimal" name="LineTotal" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParametername="LineItems" ReturnTypeDescriptorname="ArrayOfLineItem" ReturnTypeDescriptorLevel="0" name="FindLineItemInstances" />
</MethodInstances>
</Method>
</Methods>
</Entity>
</Entities>
<Associations>
<!--Self-refential entity association.-->
<Association name="CustomerToChildCustomers" AssociationMethodEntityname="Customer" AssociationMethodname="GetChildCustomersForCustomer" AssociationMethodReturnParametername="Customers" AssociationMethodReturnTypeDescriptorname="ArrayOfCustomer" AssociationMethodReturnTypeDescriptorLevel="0">
<SourceEntity name="Customer" />
<DestinationEntity name="Customer" />
</Association>
<!--Multiple source association.-->
<Association name="CustomerAndRegionToOrders" AssociationMethodEntityname="Order" AssociationMethodname="GetOrdersForCustomerAndRegion" AssociationMethodReturnParametername="Orders" AssociationMethodReturnTypeDescriptorname="ArrayOfOrder" AssociationMethodReturnTypeDescriptorLevel="0">
<SourceEntity name="Customer" />
<SourceEntity name="Region" />
<DestinationEntity name="Order" />
</Association>
<Association name="OrderToLineItems" AssociationMethodEntityname="LineItem" AssociationMethodname="GetLineItemsForOrder" AssociationMethodReturnParametername="LineItems" AssociationMethodReturnTypeDescriptorname="ArrayOfLineItem" AssociationMethodReturnTypeDescriptorLevel="0">
<SourceEntity name="Order" />
<DestinationEntity name="LineItem" />
</Association>
<!--Reuses the Web method used for SpecificFinder, also an
association method. Uses only a part of the return structure by
using the optional AssociationMethodReturnTypeDescriptorName
attribute. ArrayOfCustomer is 0 and CustomerAddresses is 1. Only
useful to disambiguate same-named TypeDescriptors.-->
<!--The AssociationMethodReturnTypeDescriptorLevel optional
attribute indicates the level of the TypeDescriptor in the
return structure. -->
<Association name="CustomerToAddresses" AssociationMethodEntityname="Customer" AssociationMethodname="GetCustomerByID" AssociationMethodReturnParametername="Customer" AssociationMethodReturnTypeDescriptorname="CustomerAddresses" AssociationMethodReturnTypeDescriptorLevel="1">
<SourceEntity name="Customer" />
<DestinationEntity name="Address" />
</Association>
</Associations>
</LobSystem>
Consulte também
Outros recursos
Exemplo SQL Server 2000 AdventureWorks
Exemplo SQL Server 2005 AdventureWorksDW