Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 2.43 KB

how-to-filter-by-field.dotnet.markdown

File metadata and controls

71 lines (47 loc) · 2.43 KB

Filter by Field Presence


{NOTE: }

{NOTE/}


{PANEL: Filter by field name }

{CODE-TABS} {CODE-TAB:csharp:Sync whereExists_1@ClientApi\Session\Querying\HowToFilterByField.cs /} {CODE-TAB:csharp:Async whereExists_1_async@ClientApi\Session\Querying\HowToFilterByField.cs /} {CODE-TAB-BLOCK:sql:RQL} // Only documents that contain field 'FirstName' will be returned

from Employees where exists("FirstName") {CODE-TAB-BLOCK/} {CODE-TABS/}

{PANEL/}

{PANEL: Filter by field path }

{CODE-TABS} {CODE-TAB:csharp:Sync whereExists_2@ClientApi\Session\Querying\HowToFilterByField.cs /} {CODE-TAB:csharp:Async whereExists_2_async@ClientApi\Session\Querying\HowToFilterByField.cs /} {CODE-TAB-BLOCK:sql:RQL} // Only documents that contain the 'Latitude' property in the specified path will be returned

from Employees where exists("Address.Location.Latitude") {CODE-TAB-BLOCK/} {CODE-TABS/}

{PANEL/}

{PANEL: Syntax}

{CODE whereExists_syntax@ClientApi\Session\Querying\HowToFilterByField.cs /}

Parameters Type Description
fieldName string The name / path of the document field to filter by
propertySelector Expression<Func<T,TValue>> Lambda expression with name / path of the document field to filter by

{PANEL/}

Related Articles

Client API

Indexes