Pavel Nasovich's Blog
There are several ways:
For anyone who wants a Linq solution, it’s:
query.Where(d => !d.SomeField.IsDefined())
Note:
To get the
IsDefined
extension method, you need to addMicrosoft.Azure.Documents.SystemFunctions
namespace
IS_DEFINED (expr)
- returns a Boolean indicating if the property has been assigned a value.
SELECT TOP {0} * FROM Telemetry t WHERE (is_defined(t.longitude) OR is_defined(t.latitude))
Thanks to Azure Feedback and Azure Cosmos DB SQL syntax reference