Closed
Description
Describe the bug
Calling .ToQueryDefinition()
throws an ArgumentNullException
with message Value cannot be null. (Parameter 'sqlQuery')
if a Where clause hasn't been added to the LINQ query.
The string representation of the IOrderedQueryable is the url path to the Container.
If I set a dummy lambda (.Where(q => true)
) the query works.
To Reproduce
new CosmosClient("...connection string here...")
.GetDatabase("AAA")
.GetContainer("BBB")
.GetItemLinqQueryable<Test>()
.ToQueryDefinition();
Expected behavior
The query will return the Items in the Container.
Actual behavior
An ArgumentNullException
is thrown.
Environment summary
SDK Version: 3.6.0 and 3.8.0
OS Version: Windows 10, Visual Studio Professional 2019 16.5.3
Additional context
Was previously reported and closed as Resolved: #719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment