Export (0) Print
Expand All

Model and Resource Files

Last modified: April 15, 2010

Applies to: SharePoint Server 2010

The Business Data Connectivity (BDC) service supports two kinds of XML application definition files: Model and Resource. A Model definition file contains the base XML metadata for a system. A Resource file enables you to import or export only the localized names, properties, and permissions, in any combination. Following are the types of Resource files:

  • LocalizedNames   Contains localized names for the metadata objects in a particular locale. When you import this file, its information is merged with the existing metadata in the metadata store. If a localized name for the locale already exists, it is overwritten with the information from the LocalizedNames file.

  • Properties   Contains properties for metadata objects. When you import this file, its information is merged with the existing metadata in the metadata store. If a property already exists, its value is overwritten with the information from the Properties file.

  • Permissions   Contains access control lists (ACLs) for metadata objects. When you import this file, its information is merged with the existing metadata in the metadata store. However, if an access control entry (ACE) already exists for an object, its value is overwritten with the information from the Permissions file. For example, if the existing application definition has only User A with access to Entity A, and you import a Permissions file that has only User B with access to the Entity A, then the existing ACL for Entity A is deleted and one is created with only User B.

If you import a Model file for an application, BDC overwrites any existing metadata for that application. However, if you import resource files containing localized names, properties, or permissions, in any combination, BDC performs a merge operation. It merges the contents of the resource file with the already existing metadata for that application.

This is extremely useful in certain situations, for example, if you have already imported an application definition file for a complex Enterprise Resource Planning (ERP) system. Consider the following three situations:

  • The back-end connection information changes. To update the connection information, you can create a simple Properties Resource file that includes only the changed properties in the LobSystemInstance object and import it. The BDC merges this information with the existing LobSystemInstance properties and, if a property already exists, its value is overwritten with the new information from the Properties Resource file.

  • Your company has diversified into a new region and your application must now support a new localized language. In this case, you can create a LocalizedNames Resource file that contains only the localized names for this new language and import it. BDC merges this information with the existing metadata, which solves this issue.

  • A franchise must use your application in their environment. In this case, they can create a Permissions Resource file that contains the ACLs for only the users in their franchise and import it. BDC deletes the existing ACLs and creates ACLs with the new information, which solves this issue.

Using Resource files as discussed in the previous situations is a better approach than updating the Model file. If you updated the Model file with the localized names or properties instead, the BDC would overwrite the existing metadata with the new information by deleting the existing metadata. This might not always be desirable and could involve additional testing and effort. For example, each time you import the Model file, the BDC deletes all the metadata objects and their IDs and therefore, requires a full crawl of the metadata objects for search.

Important note Important

A single application definition file can contain any combination of Model and Resource files. SharePoint Central Administration supports this in the Import and Export user interface (UI), and the object model supports this by using bitwise OR (|) operators.

The easiest way to understand the application definitions file feature is by experimenting with the Export application definition option in the SharePoint Central Administration UI. The Export application definition option enables you to export metadata in any combination of model or resource files.

The following examples show the Permissions and Properties metadata for the AdventureWorks2000 metadata.

Note Note

In the examples, specific values for domain name and username are replaced with generic values.

Permissions

The following XML shows a sample of a resource file that contains permissions.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadataResource.xsd" Name="AdventureWorksSample" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
  <AccessControlList>
    <AccessControlEntry Principal="domainname\username">
      <Right BdcRight="Edit" />
      <Right BdcRight="Execute" />
      <Right BdcRight="SetPermissions" />
      <Right BdcRight="SelectableInClients" />
    </AccessControlEntry>
  </AccessControlList>
  <LobSystemInstances>
    <LobSystemInstance Name="AdventureWorksSampleInstance" />
  </LobSystemInstances>
  <Entities>
    <Entity Name="Product">
      <AccessControlList>
        <AccessControlEntry Principal="domainname\username">
          <Right BdcRight="Edit" />
          <Right BdcRight="Execute" />
          <Right BdcRight="SetPermissions" />
          <Right BdcRight="SelectableInClients" />
        </AccessControlEntry>
      </AccessControlList>
      <Identifiers>
        <Identifier Name="ProductID" />
      </Identifiers>
      <Methods>
        <Method Name="GetProducts">
          <AccessControlList>
            <AccessControlEntry Principal="domainname\username">
              <Right BdcRight="Edit" />
              <Right BdcRight="Execute" />
              <Right BdcRight="SetPermissions" />
              <Right BdcRight="SelectableInClients" />
            </AccessControlEntry>
          </AccessControlList>
          <FilterDescriptors>
            <FilterDescriptor Name="ID" />
            <FilterDescriptor Name="Name" />
            <FilterDescriptor Name="ProductNumber" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Name="@MinProductID">
              <TypeDescriptor Name="MinProductID" />
            </Parameter>
            <Parameter Name="@MaxProductID">
              <TypeDescriptor Name="MaxProductID" />
            </Parameter>
            <Parameter Name="@Name">
              <TypeDescriptor Name="Name" />
            </Parameter>
            <Parameter Name="@ProductNumber">
              <TypeDescriptor Name="ProductNumber" />
            </Parameter>
            <Parameter Name="Products">
              <TypeDescriptor Name="ProductDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="ProductDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="ProductID" />
                      <TypeDescriptor Name="Name" />
                      <TypeDescriptor Name="ProductNumber" />
                      <TypeDescriptor Name="ListPrice" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="ProductFinderInstance">
              <AccessControlList>
                <AccessControlEntry Principal="domainname\username">
                  <Right BdcRight="Edit" />
                  <Right BdcRight="Execute" />
                  <Right BdcRight="SetPermissions" />
                  <Right BdcRight="SelectableInClients" />
                </AccessControlEntry>
              </AccessControlList>
            </MethodInstance>
            <MethodInstance Name="ProductSpecificFinderInstance">
              <AccessControlList>
                <AccessControlEntry Principal="domainname\username">
                  <Right BdcRight="Edit" />
                  <Right BdcRight="Execute" />
                  <Right BdcRight="SetPermissions" />
                  <Right BdcRight="SelectableInClients" />
                </AccessControlEntry>
              </AccessControlList>
            </MethodInstance>
          </MethodInstances>
        </Method>
        <Method Name="ProductIDEnumerator">
          <AccessControlList>
            <AccessControlEntry Principal="domainname\username">
              <Right BdcRight="Edit" />
              <Right BdcRight="Execute" />
              <Right BdcRight="SetPermissions" />
              <Right BdcRight="SelectableInClients" />
            </AccessControlEntry>
          </AccessControlList>
          <Parameters>
            <Parameter Name="ProductIDs">
              <TypeDescriptor Name="Products">
                <TypeDescriptors>
                  <TypeDescriptor Name="Product">
                    <TypeDescriptors>
                      <TypeDescriptor Name="ProductID" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="ProductIDEnumeratorInstance">
              <AccessControlList>
                <AccessControlEntry Principal="domainname\username">
                  <Right BdcRight="Edit" />
                  <Right BdcRight="Execute" />
                  <Right BdcRight="SetPermissions" />
                  <Right BdcRight="SelectableInClients" />
                </AccessControlEntry>
              </AccessControlList>
            </MethodInstance>
          </MethodInstances>
        </Method>
      </Methods>
      <Actions>
        <Action Name="Search on MSN">
          <ActionParameters>
            <ActionParameter Name="Name" />
          </ActionParameters>
        </Action>
        <Action Name="View Profile">
          <ActionParameters>
            <ActionParameter Name="ProductID" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>
    <Entity Name="SalesOrder">
      <AccessControlList>
        <AccessControlEntry Principal="domainname\username">
          <Right BdcRight="Edit" />
          <Right BdcRight="Execute" />
          <Right BdcRight="SetPermissions" />
          <Right BdcRight="SelectableInClients" />
        </AccessControlEntry>
      </AccessControlList>
      <Identifiers>
        <Identifier Name="SalesOrderID" />
      </Identifiers>
      <Methods>
        <Method Name="GetSalesOrders">
          <AccessControlList>
            <AccessControlEntry Principal="domainname\username">
              <Right BdcRight="Edit" />
              <Right BdcRight="Execute" />
              <Right BdcRight="SetPermissions" />
              <Right BdcRight="SelectableInClients" />
            </AccessControlEntry>
          </AccessControlList>
          <FilterDescriptors>
            <FilterDescriptor Name="ID" />
            <FilterDescriptor Name="SalesOrderNumber" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Name="@MinSalesOrderID">
              <TypeDescriptor Name="MinSalesOrderID" />
            </Parameter>
            <Parameter Name="@MaxSalesOrderID">
              <TypeDescriptor Name="MaxSalesOrderID" />
            </Parameter>
            <Parameter Name="@SalesOrderNumber">
              <TypeDescriptor Name="SalesOrderNumber" />
            </Parameter>
            <Parameter Name="SalesOrders">
              <TypeDescriptor Name="SalesOrderDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="SalesOrderDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="SalesOrderID" />
                      <TypeDescriptor Name="OrderDate" />
                      <TypeDescriptor Name="IndividualID" />
                      <TypeDescriptor Name="SubTotal" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="SalesOrderFinderInstance">
              <AccessControlList>
                <AccessControlEntry Principal="domainname\username">
                  <Right BdcRight="Edit" />
                  <Right BdcRight="Execute" />
                  <Right BdcRight="SetPermissions" />
                  <Right BdcRight="SelectableInClients" />
                </AccessControlEntry>
              </AccessControlList>
            </MethodInstance>
            <MethodInstance Name="SalesOrderSpecificFinderInstance">
              <AccessControlList>
                <AccessControlEntry Principal="domainname\username">
                  <Right BdcRight="Edit" />
                  <Right BdcRight="Execute" />
                  <Right BdcRight="SetPermissions" />
                  <Right BdcRight="SelectableInClients" />
                </AccessControlEntry>
              </AccessControlList>
            </MethodInstance>
          </MethodInstances>
        </Method>
      </Methods>
      <Actions>
        <Action Name="View Profile">
          <ActionParameters>
            <ActionParameter Name="SalesOrderID" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>
    <Entity Name="Customer">
      <AccessControlList>
        <AccessControlEntry Principal="domainname\username">
          <Right BdcRight="Edit" />
          <Right BdcRight="Execute" />
          <Right BdcRight="SetPermissions" />
          <Right BdcRight="SelectableInClients" />
        </AccessControlEntry>
      </AccessControlList>
      <Identifiers>
        <Identifier Name="IndividualID" />
      </Identifiers>
      <Methods>
        <Method Name="GetCustomers">
          <AccessControlList>
            <AccessControlEntry Principal="domainname\username">
              <Right BdcRight="Edit" />
              <Right BdcRight="Execute" />
              <Right BdcRight="SetPermissions" />
              <Right BdcRight="SelectableInClients" />
            </AccessControlEntry>
          </AccessControlList>
          <FilterDescriptors>
            <FilterDescriptor Name="ID" />
            <FilterDescriptor Name="Name" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Name="@MinIndividualID">
              <TypeDescriptor Name="MinIndividualID" />
            </Parameter>
            <Parameter Name="@MaxIndividualID">
              <TypeDescriptor Name="MaxIndividualID" />
            </Parameter>
            <Parameter Name="@Name">
              <TypeDescriptor Name="Name" />
            </Parameter>
            <Parameter Name="Customers">
              <TypeDescriptor Name="CustomerDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="CustomerDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="IndividualID" />
                      <TypeDescriptor Name="FirstName" />
                      <TypeDescriptor Name="LastName" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="CustomerFinderInstance">
              <AccessControlList>
                <AccessControlEntry Principal="domainname\username">
                  <Right BdcRight="Edit" />
                  <Right BdcRight="Execute" />
                  <Right BdcRight="SetPermissions" />
                  <Right BdcRight="SelectableInClients" />
                </AccessControlEntry>
              </AccessControlList>
            </MethodInstance>
            <MethodInstance Name="CustomerSpecificFinderInstance">
              <AccessControlList>
                <AccessControlEntry Principal="domainname\username">
                  <Right BdcRight="Edit" />
                  <Right BdcRight="Execute" />
                  <Right BdcRight="SetPermissions" />
                  <Right BdcRight="SelectableInClients" />
                </AccessControlEntry>
              </AccessControlList>
            </MethodInstance>
          </MethodInstances>
        </Method>
        <Method Name="GetSalesOrdersForCustomer">
          <AccessControlList>
            <AccessControlEntry Principal="domainname\username">
              <Right BdcRight="Edit" />
              <Right BdcRight="Execute" />
              <Right BdcRight="SetPermissions" />
              <Right BdcRight="SelectableInClients" />
            </AccessControlEntry>
          </AccessControlList>
          <Parameters>
            <Parameter Name="@IndividualID">
              <TypeDescriptor Name="IndividualID" />
            </Parameter>
            <Parameter Name="SalesOrders">
              <TypeDescriptor Name="SalesOrderDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="SalesOrderDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="SalesOrderID" />
                      <TypeDescriptor Name="OrderDate" />
                      <TypeDescriptor Name="IndividualID" />
                      <TypeDescriptor Name="SubTotal" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
        </Method>
      </Methods>
      <Actions>
        <Action Name="Send Email">
          <ActionParameters>
            <ActionParameter Name="FirstName" />
          </ActionParameters>
        </Action>
        <Action Name="View Profile">
          <ActionParameters>
            <ActionParameter Name="IndividualID" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>
  </Entities>
  <Associations>
    <Association Name="CustomerToSalesOrder">
      <AccessControlList>
        <AccessControlEntry Principal="domainname\username">
          <Right BdcRight="Edit" />
          <Right BdcRight="Execute" />
          <Right BdcRight="SetPermissions" />
          <Right BdcRight="SelectableInClients" />
        </AccessControlEntry>
      </AccessControlList>
    </Association>
  </Associations>
</LobSystem>

Properties

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadataResource.xsd" Name="AdventureWorksSample" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
  <Properties>
    <Property Name="WildcardCharacter" Type="System.String">%</Property>
  </Properties>
  <LobSystemInstances>
    <LobSystemInstance Name="AdventureWorksSampleInstance">
      <Properties>
        <Property Name="AuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode">PassThrough</Property>
        <Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider">SqlServer</Property>
        <Property Name="RdbConnection Data Source" Type="System.String">ServerNameHere</Property>
        <Property Name="RdbConnection Initial Catalog" Type="System.String">AdventureWorks2000</Property>
        <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>
        <Property Name="RdbConnection Pooling" Type="System.String">false</Property>
      </Properties>
    </LobSystemInstance>
  </LobSystemInstances>
  <Entities>
    <Entity Name="Product">
      <Properties>
        <Property Name="DefaultAction" Type="System.String">View Profile</Property>
        <Property Name="Title" Type="System.String">Name</Property>
      </Properties>
      <Identifiers>
        <Identifier Name="ProductID" />
      </Identifiers>
      <Methods>
        <Method Name="GetProducts">
          <Properties>
            <Property Name="RdbCommandText" Type="System.String">
              SELECT ProductID, Name, ProductNumber, ListPrice FROM Product WHERE (ProductID &gt;= @MinProductID) AND (ProductID &lt;= @MaxProductID) AND (Name LIKE @Name) AND (ProductNumber LIKE @ProductNumber)
            </Property>
            <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property>
          </Properties>
          <FilterDescriptors>
            <FilterDescriptor Name="ID" />
            <FilterDescriptor Name="Name">
              <Properties>
                <Property Name="UsedForDisambiguation" Type="System.Boolean">true</Property>
              </Properties>
            </FilterDescriptor>
            <FilterDescriptor Name="ProductNumber" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Name="@MinProductID">
              <TypeDescriptor Name="MinProductID" />
            </Parameter>
            <Parameter Name="@MaxProductID">
              <TypeDescriptor Name="MaxProductID" />
            </Parameter>
            <Parameter Name="@Name">
              <TypeDescriptor Name="Name" />
            </Parameter>
            <Parameter Name="@ProductNumber">
              <TypeDescriptor Name="ProductNumber" />
            </Parameter>
            <Parameter Name="Products">
              <TypeDescriptor Name="ProductDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="ProductDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="ProductID" />
                      <TypeDescriptor Name="Name">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor Name="ProductNumber">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor Name="ListPrice" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="ProductFinderInstance" />
            <MethodInstance Name="ProductSpecificFinderInstance" />
          </MethodInstances>
        </Method>
        <Method Name="ProductIDEnumerator">
          <Properties>
            <Property Name="RdbCommandText" Type="System.String">SELECT ProductID FROM Product WHERE ProductID &gt; 1200 AND ProductID &lt; 1300</Property>
            <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property>
          </Properties>
          <Parameters>
            <Parameter Name="ProductIDs">
              <TypeDescriptor Name="Products">
                <TypeDescriptors>
                  <TypeDescriptor Name="Product">
                    <TypeDescriptors>
                      <TypeDescriptor Name="ProductID" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="ProductIDEnumeratorInstance" />
          </MethodInstances>
        </Method>
      </Methods>
      <Actions>
        <Action Name="Search on MSN">
          <ActionParameters>
            <ActionParameter Name="Name" />
          </ActionParameters>
        </Action>
        <Action Name="View Profile">
          <ActionParameters>
            <ActionParameter Name="ProductID" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>
    <Entity Name="SalesOrder">
      <Properties>
        <Property Name="DefaultAction" Type="System.String">View Profile</Property>
      </Properties>
      <Identifiers>
        <Identifier Name="SalesOrderID" />
      </Identifiers>
      <Methods>
        <Method Name="GetSalesOrders">
          <Properties>
            <Property Name="RdbCommandText" Type="System.String">SELECT SalesOrderID, OrderDate, SubTotal, IndividualID FROM SalesOrderHeader, Individual WHERE (SalesOrderID &gt;= @MinSalesOrderID) AND (SalesOrderID &lt;= @MaxSalesOrderID) AND (SalesOrderNumber LIKE @SalesOrderNumber) AND SalesOrderHeader.CustomerID = Individual.CustomerID</Property>
            <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property>
          </Properties>
          <FilterDescriptors>
            <FilterDescriptor Name="ID" />
            <FilterDescriptor Name="SalesOrderNumber" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Name="@MinSalesOrderID">
              <TypeDescriptor Name="MinSalesOrderID" />
            </Parameter>
            <Parameter Name="@MaxSalesOrderID">
              <TypeDescriptor Name="MaxSalesOrderID" />
            </Parameter>
            <Parameter Name="@SalesOrderNumber">
              <TypeDescriptor Name="SalesOrderNumber" />
            </Parameter>
            <Parameter Name="SalesOrders">
              <TypeDescriptor Name="SalesOrderDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="SalesOrderDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="SalesOrderID" />
                      <TypeDescriptor Name="OrderDate">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor Name="IndividualID">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor Name="SubTotal">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="SalesOrderFinderInstance" />
            <MethodInstance Name="SalesOrderSpecificFinderInstance" />
          </MethodInstances>
        </Method>
      </Methods>
      <Actions>
        <Action Name="View Profile">
          <ActionParameters>
            <ActionParameter Name="SalesOrderID" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>
    <Entity Name="Customer">
      <Properties>
        <Property Name="DefaultAction" Type="System.String">View Profile</Property>
        <Property Name="Title" Type="System.String">FirstName</Property>
      </Properties>
      <Identifiers>
        <Identifier Name="IndividualID" />
      </Identifiers>
      <Methods>
        <Method Name="GetCustomers">
          <Properties>
            <Property Name="RdbCommandText" Type="System.String">SELECT * FROM Individual WHERE (IndividualID &gt;= @MinIndividualID) AND (IndividualID &lt;= @MaxIndividualID) AND ((FirstName+' '+LastName) LIKE @Name)</Property>
            <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property>
          </Properties>
          <FilterDescriptors>
            <FilterDescriptor Name="ID" />
            <FilterDescriptor Name="Name" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Name="@MinIndividualID">
              <TypeDescriptor Name="MinIndividualID" />
            </Parameter>
            <Parameter Name="@MaxIndividualID">
              <TypeDescriptor Name="MaxIndividualID" />
            </Parameter>
            <Parameter Name="@Name">
              <TypeDescriptor Name="Name" />
            </Parameter>
            <Parameter Name="Customers">
              <TypeDescriptor Name="CustomerDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="CustomerDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="IndividualID" />
                      <TypeDescriptor Name="FirstName">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor Name="LastName">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Name="CustomerFinderInstance" />
            <MethodInstance Name="CustomerSpecificFinderInstance" />
          </MethodInstances>
        </Method>
        <Method Name="GetSalesOrdersForCustomer">
          <Properties>
            <Property Name="RdbCommandText" Type="System.String">SELECT SalesOrderID, OrderDate, SubTotal,Individual.IndividualID FROM SalesOrderHeader,Individual WHERE SalesOrderHeader.CustomerID=Individual.CustomerID and Individual.IndividualID=@IndividualID</Property>
            <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property>
          </Properties>
          <Parameters>
            <Parameter Name="@IndividualID">
              <TypeDescriptor Name="IndividualID" />
            </Parameter>
            <Parameter Name="SalesOrders">
              <TypeDescriptor Name="SalesOrderDataReader">
                <TypeDescriptors>
                  <TypeDescriptor Name="SalesOrderDataRecord">
                    <TypeDescriptors>
                      <TypeDescriptor Name="SalesOrderID" />
                      <TypeDescriptor Name="OrderDate">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor Name="IndividualID">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                      <TypeDescriptor Name="SubTotal">
                        <Properties>
                          <Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
                        </Properties>
                      </TypeDescriptor>
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
        </Method>
      </Methods>
      <Actions>
        <Action Name="Send Email">
          <ActionParameters>
            <ActionParameter Name="FirstName" />
          </ActionParameters>
        </Action>
        <Action Name="View Profile">
          <ActionParameters>
            <ActionParameter Name="IndividualID" />
          </ActionParameters>
        </Action>
      </Actions>
    </Entity>
  </Entities>
  <Associations>
    <Association Name="CustomerToSalesOrder" />
  </Associations>
</LobSystem>
Show:
© 2014 Microsoft