Compartilhar via


XML Snippet: Use Intepretations in a BDC Model

Applies to: SharePoint Server 2010

The following examples shows the use of interpretations in a BDC model.

Example

<Method IsStatic="false" Name="IntFinder">
  <Properties>
    <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>
    <Property Name="RdbCommandText" Type="System.String">[dbo].[IntFinder]</Property>
    <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>
    <Property Name="BackEndObject" Type="System.String">IntFinder</Property>
    <Property Name="Schema" Type="System.String">dbo</Property>
  </Properties>
  <AccessControlList>
    <AccessControlEntry Principal="NT Authority\Authenticated Users">
      <Right BdcRight="Edit" />
      <Right BdcRight="Execute" />
      <Right BdcRight="SetPermissions" />
      <Right BdcRight="SelectableInClients" />
    </AccessControlEntry>
  </AccessControlList>
  <Parameters>
    <Parameter Direction="Return" Name="IntFinder">
      <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="IntFinder">
        <TypeDescriptors>
          <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="IntFinderElement">
            <TypeDescriptors>
              <TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Id" Name="Id">
                <Interpretation>
                  <ConvertType LOBType="System.Int32" BDCType="System.String" />
                </Interpretation>
              </TypeDescriptor>
              <TypeDescriptor TypeName="System.String" Name="ExtendedName">
                <Interpretation>
                  <NormalizeString FromLOB="NormalizeToNull" ToLOB="NormalizeToEmptyString" />
                </Interpretation>
              </TypeDescriptor>
              <TypeDescriptor TypeName="System.DateTime" Name="DateAndTime">
                <Interpretation>
                  <NormalizeDateTime LobDateTimeMode="UTC" />
                </Interpretation>
              </TypeDescriptor>
            </TypeDescriptors>
          </TypeDescriptor>
        </TypeDescriptors>
      </TypeDescriptor>
    </Parameter>
  </Parameters>
  <MethodInstances>
    <MethodInstance Type="Finder" ReturnParameterName="IntFinder" Default="true" Name="IntFinder" DefaultDisplayName="DB Read List">
      <Properties>
        <Property Name="UseClientCachingForSearch" Type="System.String"></Property>
        <Property Name="RootFinder" Type="System.String"></Property>
      </Properties>
      <AccessControlList>
        <AccessControlEntry Principal="NT Authority\Authenticated Users">
          <Right BdcRight="Edit" />
          <Right BdcRight="Execute" />
          <Right BdcRight="SetPermissions" />
          <Right BdcRight="SelectableInClients" />
        </AccessControlEntry>
      </AccessControlList>
    </MethodInstance>
  </MethodInstances>
</Method>