EntityQueryExpression-klasse
Defines a complex query to retrieve entity metadata.
Navneområde: Microsoft.Xrm.Sdk.Metadata.Query
Assembly: Microsoft.Xrm.Sdk (i Microsoft.Xrm.Sdk.dll)
Syntaks
'Deklaration
<DataContractAttribute(Name:="EntityQueryExpression", Namespace:="https://schemas.microsoft.com/xrm/2011/Metadata/Query")> _
Public NotInheritable Class EntityQueryExpression
Inherits MetadataQueryExpression
[DataContractAttribute(Name="EntityQueryExpression", Namespace="https://schemas.microsoft.com/xrm/2011/Metadata/Query")]
public sealed class EntityQueryExpression : MetadataQueryExpression
Bemærkninger
The following example shows the use of an EntityQueryExpression to retrieve entity metadata.
//An entity query expression to combine the filter expressions and property expressions for the query.
EntityQueryExpression entityQueryExpression = new EntityQueryExpression()
{
Criteria = EntityFilter,
Properties = EntityProperties,
AttributeQuery = new AttributeQueryExpression()
{
Criteria = AttributeFilter,
Properties = AttributeProperties
},
LabelQuery = labelQuery
};
//Retrieve the metadata for the query without a ClientVersionStamp
RetrieveMetadataChangesResponse initialRequest = getMetadataChanges(entityQueryExpression, null, DeletedMetadataFilters.OptionSet);
...
protected RetrieveMetadataChangesResponse getMetadataChanges(
EntityQueryExpression entityQueryExpression,
String clientVersionStamp,
DeletedMetadataFilters deletedMetadataFilter)
{
RetrieveMetadataChangesRequest retrieveMetadataChangesRequest = new RetrieveMetadataChangesRequest()
{
Query = entityQueryExpression,
ClientVersionStamp = clientVersionStamp,
DeletedMetadataFilters = deletedMetadataFilter
};
return (RetrieveMetadataChangesResponse)_service.Execute(retrieveMetadataChangesRequest);
}
Nedarvningshierarki
System.Object
Microsoft.Xrm.Sdk.Metadata.Query.MetadataQueryBase
Microsoft.Xrm.Sdk.Metadata.Query.MetadataQueryExpression
Microsoft.Xrm.Sdk.Metadata.Query.EntityQueryExpression
Sikkerhed i tråd
Alle offentlige statiske (Shared i Visual Basic) medlemmer af denne type er trådsikret. Alle medlemmer af forekomsten er ikke garanteret trådsikkerhed.
Platforme
Development Platforms
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Target Platforms
Windows 98,Windows 2000,Windows 2000 Server,Windows CE,Windows Server 2008,Windows 98 Second Edition,Pocket PC,Smartphone,Windows Server 2003,Windows XP Professional,Windows Server 2008,Windows Server 2012,Windows 7,Windows 8,Windows 8.1
Change History
Se også
Reference
EntityQueryExpression-medlemmer
Microsoft.Xrm.Sdk.Metadata.Query-navneområde
Andre ressourcer
Query and Capture Changes to Metadata
Sample: Query Metadata and Detect Changes
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.