Classe EntityQueryExpression
Aplica-se a: CRM 2015 on-prem, CRM Online
Defines a complex query to retrieve entity metadata.
Namespace: Microsoft.Xrm.Sdk.Metadata.Query
Assembly: Microsoft.Xrm.Sdk (em Microsoft.Xrm.Sdk.dll)
Sintaxe
'Declaração
<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
Comentários
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);
}
Hierarquia de Herança
System.Object
Microsoft.Xrm.Sdk.Metadata.Query.MetadataQueryBase
Microsoft.Xrm.Sdk.Metadata.Query.MetadataQueryExpression
Microsoft.Xrm.Sdk.Metadata.Query.EntityQueryExpression
Segurança do Thread
Todos os membros estáticos (Shared in Visual Basic) desse tipo são protegidos por thread. Não há nenhum garantia de que os membros de instância sejam protegidos por thread.
Plataformas
Plataformas de desenvolvimento
Windows Vista, Windows Server 2003 e
Plataformas de destino
Windows 98,Windows 2000,Windows 2000 Server,Windows CE,Windows Server 2008,Windows 98 Second Edition,Pocket PC,Smart Phone,Windows Server 2003,Windows XP Professional,Windows Vista,Windows XP
Change History
Consulte também
Referência
Membros de EntityQueryExpression
Namespace Microsoft.Xrm.Sdk.Metadata.Query
Outros recursos
Query and Capture Changes to Metadata
Sample: Query Metadata and Detect Changes
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.