。
<Method Name="GetSalesOrdersForCustomer">
<Properties>
<Property Name="RdbCommandText" Type="System.String">
SELECT
soh.salesorderid,
soh.orderdate,
soh.shipdate,
soh.status,
soh.salesordernumber
FROM
sales.salesorderheader soh
inner join sales.customer c
on soh.customerid = c.customerid
where
c.customertype = 'i'
AND c.customerid = @customerID
</Property>
<Property Name="RdbCommandType" Type="System.String">Text</Property>
</Properties>
<Parameters>
<Parameter Direction="In" Name="@customerID">
<TypeDescriptor TypeName="System.Int32" Name="CustomerID" IdentifierEntityName=
"Customer" IdentifierName="CustomerID">
<!-- Note that we don't have any default values for this. -->
<!--Also, note the IdentifierEntityName attribute referes to the customer entity.-->
</TypeDescriptor>
</Parameter>
<Parameter Direction="Return" Name="SalesOrders">
<TypeDescriptor TypeName="System.Data.IDataReader, System.Data,
Version=2.0.3600.0, Culture=neutral, PublicKeyToken=
b77a5c561934e089" IsCollection="true" Name="SalesOrderDataReader">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Data.IDataRecord, System.Data,
Version=2.0.3600.0, Culture=neutral, PublicKeyToken=
b77a5c561934e089" Name="SalesOrderDataRecord">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Int32" IdentifierName=
"SalesOrderID" Name="SalesOrderID" />
<TypeDescriptor TypeName="System.DateTime" Name="orderdate" />
<TypeDescriptor TypeName="System.DateTime" Name="shipdate" />
<TypeDescriptor TypeName="System.String" Name="status" />
<TypeDescriptor TypeName="System.String" Name="salesordernumber" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
</Method>