Partager via


Extrait de code XML : utiliser des interprétations dans un modèle BDC

Dernière modification : mercredi 21 avril 2010

S’applique à : SharePoint Server 2010

L’exemple suivant illustre l’utilisation d’interprétations dans un modèle BDC.

Exemple

<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>